Unverified Commit 312eb890 authored by Kubernetes Prow Robot's avatar Kubernetes Prow Robot Committed by GitHub

Merge pull request #75760 from wojtek-t/follow_comment_from_critical_sections

Add explanation about forgetFunc in cacher
parents a519e912 605522b0
......@@ -365,6 +365,8 @@ func (c *Cacher) Watch(ctx context.Context, key string, resourceVersion string,
// Create a watcher here to reduce memory allocations under lock,
// given that memory allocation may trigger GC and block the thread.
// Also note that emptyFunc is a placeholder, until we will be able
// to compute watcher.forget function (which has to happen under lock).
watcher := newCacheWatcher(chanSize, filterWithAttrsFunction(key, pred), emptyFunc, c.versioner)
// We explicitly use thread unsafe version and do locking ourself to ensure that
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment