Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
d7846ec7e0 |
@@ -56,7 +56,12 @@ 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)
|
|
||||||
|
b.RLock()
|
||||||
|
l := len(lookup)
|
||||||
|
b.RUnlock()
|
||||||
|
|
||||||
|
items := make([]*Item, 0, l/10)
|
||||||
|
|
||||||
b.RLock()
|
b.RLock()
|
||||||
for key, item := range lookup {
|
for key, item := range lookup {
|
||||||
|
Reference in New Issue
Block a user