- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 13 for newTimer (0.52 sec)
-
staging/src/k8s.io/apiserver/pkg/storage/cacher/cache_watcher_test.go
t.Fatal("failed adding an even to the watcher") } if !w.add(&watchCacheEvent{Object: makePod(15), ResourceVersion: 15}, time.NewTimer(1*time.Second)) { t.Fatal("failed adding an even to the watcher") } if w.add(&watchCacheEvent{Object: makePod(20), ResourceVersion: 20}, time.NewTimer(1*time.Second)) { t.Fatal("expected the add method to fail") } if err := wait.PollImmediate(1*time.Second, 5*time.Second, func() (bool, error) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jun 04 09:20:10 UTC 2024 - 22.9K bytes - Viewed (0) -
src/time/tick_test.go
} }) } run(t, "After", func() { After(Hour) }) run(t, "Tick", func() { Tick(Hour) }) run(t, "NewTimer", func() { NewTimer(Hour) }) run(t, "NewTicker", func() { NewTicker(Hour) }) run(t, "NewTimerStop", func() { NewTimer(Hour).Stop() }) run(t, "NewTickerStop", func() { NewTicker(Hour).Stop() }) } func TestChan(t *testing.T) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 11 17:10:37 UTC 2024 - 14.7K bytes - Viewed (0) -
cmd/handler-api.go
f.ServeHTTP(w, r) return } if tc, ok := r.Context().Value(mcontext.ContextTraceKey).(*mcontext.TraceCtxt); ok { tc.FuncName = "s3.MaxClients" } deadlineTimer := time.NewTimer(deadline) defer deadlineTimer.Stop() ctx := r.Context() select { case pool <- struct{}{}: defer func() { <-pool }() globalHTTPStats.addRequestsInQueue(-1) if contextCanceled(ctx) {
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Wed Jun 12 08:13:12 UTC 2024 - 10.4K bytes - Viewed (0) -
cmd/background-newdisks-heal-ops.go
func monitorLocalDisksAndHeal(ctx context.Context, z *erasureServerPools) { // Perform automatic disk healing when a disk is replaced locally. diskCheckTimer := time.NewTimer(defaultMonitorNewDiskInterval) defer diskCheckTimer.Stop() for { select { case <-ctx.Done(): return case <-diskCheckTimer.C:
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Tue Jun 04 15:12:32 UTC 2024 - 14.5K bytes - Viewed (0) -
cmd/data-scanner.go
} else if len(buf) > 8 { cycleInfo.next = binary.LittleEndian.Uint64(buf[:8]) buf = buf[8:] _, err := cycleInfo.UnmarshalMsg(buf) bugLogIf(ctx, err) } scannerTimer := time.NewTimer(scannerCycle.Load()) defer scannerTimer.Stop() defer globalScannerMetrics.setCycle(nil) for { select { case <-ctx.Done(): return case <-scannerTimer.C:
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri Jun 07 15:43:17 UTC 2024 - 47.6K bytes - Viewed (0) -
src/os/exec/exec.go
err = wrappedError{ prefix: "exec: canceling Cmd", err: interruptErr, } } } if c.WaitDelay == 0 { resultc <- ctxResult{err: err} return } timer := time.NewTimer(c.WaitDelay) select { case resultc <- ctxResult{err: err, timer: timer}: // c.Process.Wait returned and we've handed the timer off to c.Wait. // It will take care of goroutine shutdown from here. return
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 07 20:13:53 UTC 2024 - 41.4K bytes - Viewed (0) -
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) -
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) -
cmd/xl-storage-disk-id-check.go
} } // Offset checks a bit. time.Sleep(time.Duration(rng.Int63n(int64(1 * time.Second)))) dctx, dcancel := context.WithCancel(ctx) started := time.Now() go func() { timeout := time.NewTimer(globalDriveConfig.GetMaxTimeout()) select { case <-dctx.Done(): if !timeout.Stop() { <-timeout.C } case <-timeout.C: spent := time.Since(started)
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Mon Jun 10 15:51:27 UTC 2024 - 33.4K bytes - Viewed (0) -
pilot/pkg/bootstrap/server.go
} close(stopped) } }() s.grpcServer.GracefulStop() if s.secureGrpcServer != nil { s.secureGrpcServer.GracefulStop() } close(stopped) }() t := time.NewTimer(s.shutdownDuration) select { case <-t.C: s.grpcServer.Stop() if s.secureGrpcServer != nil { s.secureGrpcServer.Stop() } case <-stopped: t.Stop() }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Jun 13 17:48:28 UTC 2024 - 46.3K bytes - Viewed (0)