mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-18 16:21:13 +00:00
Merge pull request #117154 from p0lyn0mial/upstream-cacher-size-rlock
watchcache: currentCapacity acquires a read lock
This commit is contained in:
commit
6262d25371
@ -608,8 +608,8 @@ func (w *watchCache) Resync() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (w *watchCache) currentCapacity() int {
|
func (w *watchCache) currentCapacity() int {
|
||||||
w.Lock()
|
w.RLock()
|
||||||
defer w.Unlock()
|
defer w.RUnlock()
|
||||||
return w.capacity
|
return w.capacity
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user