Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for waitingCount (0.09 sec)

  1. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/testing/promise/counting.go

    	p.lock.Lock()
    	defer p.lock.Unlock()
    	if !p.isSet {
    		p.waitingCount++
    		p.activeCounter.Add(-1)
    		p.cond.Wait()
    	}
    	return p.value
    }
    
    func (p *countingPromise) Set(value interface{}) bool {
    	if p.isSet {
    		return false
    	}
    	p.isSet = true
    	p.value = value
    	if p.waitingCount > 0 {
    		p.activeCounter.Add(p.waitingCount)
    		p.waitingCount = 0
    		p.cond.Broadcast()
    	}
    	return true
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Aug 10 14:37:53 UTC 2021
    - 3.3K bytes
    - Viewed (0)
Back to top