- Sort Score
- Result 10 results
- Languages All
Results 81 - 90 of 192 for newTimer (0.29 sec)
-
staging/src/k8s.io/apiserver/pkg/storage/cacher/watch_cache.go
// resourceVersion=0 is the most common case. if resourceVersion > 0 { go func() { // Wake us up when the time limit has expired. The docs // promise that time.After (well, NewTimer, which it calls) // will wait *at least* the duration given. Since this go // routine starts sometime after we record the start time, and // it will wake up the loop below sometime after the broadcast,
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jun 11 10:20:57 UTC 2024 - 26.2K bytes - Viewed (0) -
src/time/time_test.go
// and that we also don't panic. func TestConcurrentTimerReset(t *testing.T) { const goroutines = 8 const tries = 1000 var wg sync.WaitGroup wg.Add(goroutines) timer := NewTimer(Hour) for i := 0; i < goroutines; i++ { go func(i int) { defer wg.Done() for j := 0; j < tries; j++ { timer.Reset(Hour + Duration(i*j)) } }(i) } wg.Wait() }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 03:13:47 UTC 2024 - 56.5K bytes - Viewed (0) -
src/net/http/transfer.go
var buf [1]byte var rres readResult rres.n, rres.err = body.Read(buf[:]) if rres.n == 1 { rres.b = buf[0] } t.ByteReadCh <- rres close(t.ByteReadCh) }(t.Body) timer := time.NewTimer(200 * time.Millisecond) select { case rres := <-t.ByteReadCh: timer.Stop() if rres.n == 0 && rres.err == io.EOF { // It was empty. t.Body = nil t.ContentLength = 0 } else if rres.n == 1 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 21 22:14:00 UTC 2024 - 31.1K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/storage/cacher/watch_cache_test.go
wc.upperBoundCapacity = max(capacity, defaultUpperBoundCapacity) return wc } type immediateTickerFactory struct{} func (t *immediateTickerFactory) NewTimer(d time.Duration) clock.Timer { timer := immediateTicker{ c: make(chan time.Time), } timer.Reset(d) return &timer } type immediateTicker struct { c chan time.Time }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jun 04 09:20:10 UTC 2024 - 35.4K bytes - Viewed (0) -
src/cmd/go/internal/script/cmds.go
if len(args) != 1 { return nil, ErrUsage } d, err := time.ParseDuration(args[0]) if err != nil { return nil, err } timer := time.NewTimer(d) wait := func(s *State) (stdout, stderr string, err error) { ctx := s.Context() select { case <-ctx.Done(): timer.Stop() return "", "", ctx.Err() case <-timer.C:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 26 19:58:28 UTC 2024 - 28.5K bytes - Viewed (0) -
src/net/http/transport.go
func (pc *persistConn) waitForContinue(continueCh <-chan struct{}) func() bool { if continueCh == nil { return nil } return func() bool { timer := time.NewTimer(pc.t.ExpectContinueTimeout) defer timer.Stop() select { case _, ok := <-continueCh: return ok case <-timer.C: return true case <-pc.closech: return false }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jun 06 21:59:21 UTC 2024 - 91K bytes - Viewed (0) -
cmd/bucket-replication.go
// PersistToDisk persists in-memory resync metadata stats to disk at periodic intervals func (s *replicationResyncer) PersistToDisk(ctx context.Context, objectAPI ObjectLayer) { resyncTimer := time.NewTimer(resyncTimeInterval) defer resyncTimer.Stop() // For each bucket name, store the last timestamp of the // successful save of replication status in the backend disks.
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Thu Jun 13 06:56:12 UTC 2024 - 114.4K bytes - Viewed (0) -
src/database/sql/fakedb_test.go
stmt.cmd = cmd parts = parts[1:] if c.waiter != nil { c.waiter(ctx) if err := ctx.Err(); err != nil { return nil, err } } if stmt.wait > 0 { wait := time.NewTimer(stmt.wait) select { case <-wait.C: case <-ctx.Done(): wait.Stop() return nil, ctx.Err() } } c.incrStat(&c.stmtsMade) var err error switch cmd {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 01 12:38:07 UTC 2024 - 30.3K bytes - Viewed (0) -
src/os/signal/signal_test.go
} func waitSig1(t *testing.T, c <-chan os.Signal, sig os.Signal, all bool) { t.Helper() // Sleep multiple times to give the kernel more tries to // deliver the signal. start := time.Now() timer := time.NewTimer(settleTime / 10) defer timer.Stop() // If the caller notified for all signals on c, filter out SIGURG, // which is used for runtime preemption and can come at unpredictable times.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Nov 09 15:34:56 UTC 2023 - 27.2K bytes - Viewed (0) -
pkg/controller/volume/persistentvolume/framework_test.go
var err error // Read recorded events - wait up to 1 minute to get all the expected ones // (just in case some goroutines are slower with writing) timer := time.NewTimer(time.Minute) defer timer.Stop() logger := klog.FromContext(ctx) fakeRecorder := ctrl.eventRecorder.(*record.FakeRecorder) gotEvents := []string{} finished := false
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Nov 01 09:54:00 UTC 2023 - 38.3K bytes - Viewed (0)