Skip to content

Commit f6bd226

Browse files
authored
[no-ci] Update README.md
1 parent 1b8b697 commit f6bd226

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

+13
Original file line numberDiff line numberDiff line change
@@ -151,3 +151,16 @@ In this implementation, the hashing functions used is [murmurhash](github.com/tw
151151

152152
Given the particular hashing scheme, it's best to be empirical about this. Note
153153
that estimating the FP rate will clear the Bloom filter.
154+
155+
156+
157+
158+
### Goroutine safety
159+
160+
In general, it not safe to access
161+
the same filter using different goroutines--they are
162+
unsynchronized for performance. Should you want to access
163+
a filter from more than one goroutine, you should
164+
provide synchronization. Typically this is done by using channels (in Go style; so there is only ever one owner),
165+
or by using `sync.Mutex` to serialize operations. Exceptionally, you may access the same filter from different
166+
goroutines if you never modify the content of the filter.

0 commit comments

Comments
 (0)