remove race condition
This commit is contained in:
parent
fdd08e71c4
commit
e9b7be5016
1 changed files with 1 additions and 1 deletions
|
@ -56,7 +56,7 @@ func (b *bucket) delete(key string) *Item {
|
||||||
// write lock)
|
// write lock)
|
||||||
func (b *bucket) deleteFunc(matches func(key string, item interface{}) bool, deletables chan *Item) int {
|
func (b *bucket) deleteFunc(matches func(key string, item interface{}) bool, deletables chan *Item) int {
|
||||||
lookup := b.lookup
|
lookup := b.lookup
|
||||||
items := make([]*Item, 0, len(lookup)/10)
|
items := make([]*Item, 0)
|
||||||
|
|
||||||
b.RLock()
|
b.RLock()
|
||||||
for key, item := range lookup {
|
for key, item := range lookup {
|
||||||
|
|
Loading…
Reference in a new issue