mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
rebase: update kubernetes to v1.20.0
updated kubernetes packages to latest release. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
committed by
mergify[bot]
parent
4abe128bd8
commit
83559144b1
18
vendor/k8s.io/apimachinery/pkg/util/clock/clock.go
generated
vendored
18
vendor/k8s.io/apimachinery/pkg/util/clock/clock.go
generated
vendored
@ -348,7 +348,13 @@ func (f *fakeTimer) Stop() bool {
|
||||
// Reset conditionally updates the firing time of the timer. If the
|
||||
// timer has neither fired nor been stopped then this call resets the
|
||||
// timer to the fake clock's "now" + d and returns true, otherwise
|
||||
// this call returns false. This is like time.Timer::Reset.
|
||||
// it creates a new waiter, adds it to the clock, and returns true.
|
||||
//
|
||||
// It is not possible to return false, because a fake timer can be reset
|
||||
// from any state (waiting to fire, already fired, and stopped).
|
||||
//
|
||||
// See the GoDoc for time.Timer::Reset for more context on why
|
||||
// the return value of Reset() is not useful.
|
||||
func (f *fakeTimer) Reset(d time.Duration) bool {
|
||||
f.fakeClock.lock.Lock()
|
||||
defer f.fakeClock.lock.Unlock()
|
||||
@ -360,7 +366,15 @@ func (f *fakeTimer) Reset(d time.Duration) bool {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
// No existing waiter, timer has already fired or been reset.
|
||||
// We should still enable Reset() to succeed by creating a
|
||||
// new waiter and adding it to the clock's waiters.
|
||||
newWaiter := fakeClockWaiter{
|
||||
targetTime: f.fakeClock.time.Add(d),
|
||||
destChan: seekChan,
|
||||
}
|
||||
f.fakeClock.waiters = append(f.fakeClock.waiters, newWaiter)
|
||||
return true
|
||||
}
|
||||
|
||||
// Ticker defines the Ticker interface
|
||||
|
Reference in New Issue
Block a user