mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-10-26 21:22:16 +08:00
fix: lock
This commit is contained in:
parent
908e812aa4
commit
e7e8d88010
@ -94,11 +94,11 @@ func (x *LayLRU[K, V]) GetBatch(keys []K, fetch func(keys []K) (map[K]V, error))
|
||||
once sync.Once
|
||||
)
|
||||
|
||||
x.lock.Lock()
|
||||
res := make(map[K]V)
|
||||
queries := make([]K, 0)
|
||||
setVs := make(map[K]*layLruItem[V])
|
||||
for _, key := range keys {
|
||||
x.lock.Lock()
|
||||
v, ok := x.core.Get(key)
|
||||
x.lock.Unlock()
|
||||
if ok {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user