Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for nonblockingAdd (0.23 sec)

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

    //
    // Note that bookmark events are never added via the add method only via the nonblockingAdd.
    // Changing this behaviour will require moving the markBookmarkAfterRvAsReceived method
    func (c *cacheWatcher) add(event *watchCacheEvent, timer *time.Timer) bool {
    	// Try to send the event immediately, without blocking.
    	if c.nonblockingAdd(event) {
    		return true
    	}
    
    	closeFunc := func() {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Aug 24 12:22:41 UTC 2023
    - 18.7K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/storage/cacher/cache_watcher_test.go

    	// one event has been popped off from the input chan
    	if !w.add(&watchCacheEvent{Object: makePod(5), ResourceVersion: 5}, time.NewTimer(1*time.Second)) {
    		t.Fatal("failed adding an even to the watcher")
    	}
    	if !w.nonblockingAdd(&watchCacheEvent{Type: watch.Bookmark, ResourceVersion: 10, Object: &v1.Pod{ObjectMeta: metav1.ObjectMeta{ResourceVersion: "10"}}}) {
    		t.Fatal("failed adding an even to the watcher")
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 09:20:10 UTC 2024
    - 22.9K bytes
    - Viewed (0)
Back to top