Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for stopLocked (0.08 sec)

  1. staging/src/k8s.io/apiserver/pkg/storage/cacher/cache_watcher_test.go

    		default:
    		}
    		w.setDrainInputBufferLocked(false)
    		w.stopLocked()
    	}
    }
    
    func TestCacheWatcherStoppedInAnotherGoroutine(t *testing.T) {
    	var w *cacheWatcher
    	done := make(chan struct{})
    	filter := func(string, labels.Set, fields.Set) bool { return true }
    	forget := func(drainWatcher bool) {
    		w.setDrainInputBufferLocked(drainWatcher)
    		w.stopLocked()
    		done <- struct{}{}
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 09:20:10 UTC 2024
    - 22.9K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/storage/cacher/cache_watcher.go

    	return c.result
    }
    
    // Implements watch.Interface.
    func (c *cacheWatcher) Stop() {
    	c.forget(false)
    }
    
    // we rely on the fact that stopLocked is actually protected by Cacher.Lock()
    func (c *cacheWatcher) stopLocked() {
    	if !c.stopped {
    		c.stopped = true
    		// stop without draining the input channel was requested.
    		if !c.drainInputBuffer {
    			close(c.done)
    		}
    		close(c.input)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Aug 24 12:22:41 UTC 2023
    - 18.7K bytes
    - Viewed (0)
Back to top