Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for nonblockingAdd (0.32 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)
  3. staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher.go

    	// Dispatching event in nonblocking way first, which make faster watchers
    	// not be blocked by slower ones.
    	if event.Type == watch.Bookmark {
    		for _, watcher := range c.watchersBuffer {
    			watcher.nonblockingAdd(event)
    		}
    	} else {
    		// Set up caching of object serializations only for dispatching this event.
    		//
    		// Storing serializations in memory would result in increased memory usage,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 10:12:02 UTC 2024
    - 51.8K bytes
    - Viewed (0)
Back to top