Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for timeBudget (0.27 sec)

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

    type timeBudget interface {
    	takeAvailable() time.Duration
    	returnUnused(unused time.Duration)
    }
    
    type timeBudgetImpl struct {
    	sync.Mutex
    	clock     clock.Clock
    	budget    time.Duration
    	maxBudget time.Duration
    	refresh   time.Duration
    	// last store last access time
    	last time.Time
    }
    
    func newTimeBudget() timeBudget {
    	result := &timeBudgetImpl{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 26 17:14:05 UTC 2022
    - 2.6K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher.go

    	watcherIdx int
    	watchers   indexedWatchers
    
    	// Defines a time budget that can be spend on waiting for not-ready watchers
    	// while dispatching event before shutting them down.
    	dispatchTimeoutBudget timeBudget
    
    	// Handling graceful termination.
    	stopLock sync.RWMutex
    	stopped  bool
    	stopCh   chan struct{}
    	stopWg   sync.WaitGroup
    
    	clock clock.Clock
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 10:12:02 UTC 2024
    - 51.8K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher_whitebox_test.go

    	//    happening in the test at all
    	// 3) if the test was cpu-starved and we weren't able to consume events
    	//    from w2 ResultCh it could have happened that its buffer was also
    	//    filling in and given we no longer had timeBudget (consumed in (1))
    	//    trying to put next item was simply breaking the watch
    	// Using fakeTimeBudget gives us always a budget to wait and have a test
    	// pick up something from ResultCh in the meantime.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 10:12:02 UTC 2024
    - 82.9K bytes
    - Viewed (0)
Back to top