- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 85 for newTimer (0.14 sec)
-
pkg/adsc/adsc.go
// before (ie CDS). The only real alternative is to wait which introduces its own // issues. func (a *ADSC) WaitSingle(to time.Duration, want string, reject string) error { t := time.NewTimer(to) for { select { case t := <-a.Updates: if t == "" { return fmt.Errorf("closed") } if t != want && t == reject { return fmt.Errorf("wanted update for %v got %v", want, t)
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Feb 05 22:18:49 UTC 2024 - 35K 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) -
src/net/timeout_test.go
if err := ln.(*TCPListener).SetDeadline(time.Now().Add(-5 * time.Second)); err != nil { t.Error(err) } if err := ln.(*TCPListener).SetDeadline(noDeadline); err != nil { t.Error(err) } maxch <- time.NewTimer(100 * time.Millisecond) _, err := ln.Accept() ch <- err }() max := <-maxch defer max.Stop() select { case err := <-ch: if perr := parseAcceptError(err); perr != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 24 18:06:55 UTC 2024 - 30K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/endpoints/handlers/watch.go
// and a cleanup function to call when this happens. func (w *realTimeoutFactory) TimeoutCh() (<-chan time.Time, func() bool) { if w.timeout == 0 { return neverExitWatch, func() bool { return false } } t := time.NewTimer(w.timeout) return t.C, t.Stop } // serveWatchHandler returns a handle to serve a watch response. // TODO: the functionality in this method and in WatchServer.Serve is not cleanly decoupled.
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Dec 14 16:37:25 UTC 2023 - 11.4K bytes - Viewed (0) -
src/runtime/time.go
type timeTimer struct { c unsafe.Pointer // <-chan time.Time init bool timer } // newTimer allocates and returns a new time.Timer or time.Ticker (same layout) // with the given parameters. // //go:linkname newTimer time.newTimer func newTimer(when, period int64, f func(arg any, seq uintptr, delay int64), arg any, c *hchan) *timeTimer { t := new(timeTimer) t.timer.init(nil, nil)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 29 14:36:24 UTC 2024 - 37.5K bytes - Viewed (0) -
cmd/admin-heal-ops.go
} func (ahs *allHealState) periodicHealSeqsClean(ctx context.Context) { // Launch clean-up routine to remove this heal sequence (after // it ends) from the global state after timeout has elapsed. periodicTimer := time.NewTimer(time.Minute * 5) defer periodicTimer.Stop() for { select { case <-periodicTimer.C: now := UTCNow() ahs.Lock() for path, h := range ahs.healSeqMap {
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Thu May 09 18:04:41 UTC 2024 - 25.1K bytes - Viewed (0) -
pkg/kubeapiserver/authenticator/config.go
return utilerrors.NewAggregate([]error{lastErr, waitErr}) // filters out nil errors } oldJWTAuthenticator := c.jwtAuthenticatorPtr.Swap(updatedJWTAuthenticator) go func() { t := time.NewTimer(time.Minute) defer t.Stop() select { case <-c.serverLifecycle.Done(): case <-t.C: } // TODO maybe track requests so we know when this is safe to do oldJWTAuthenticator.cancel() }()
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Mar 09 19:29:33 UTC 2024 - 15.4K bytes - Viewed (0) -
cmd/erasure-sets.go
r := rand.New(rand.NewSource(time.Now().UnixNano())) time.Sleep(time.Duration(r.Float64() * float64(time.Second))) // Pre-emptively connect the disks if possible. s.connectDisks() monitor := time.NewTimer(monitorInterval) defer monitor.Stop() for { select { case <-ctx.Done(): return case <-monitor.C: if serverDebugLog { console.Debugln("running drive monitoring") }
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 37.7K bytes - Viewed (0) -
src/net/http/httptest/server.go
// // Out of paranoia for making a late change in Go 1.6, we // bound how long this can wait, since golang.org/issue/14291 // isn't fully understood yet. At least this should only be used // in tests. timer := time.NewTimer(5 * time.Second) defer timer.Stop() for i := 0; i < nconn; i++ { select { case <-ch: case <-timer.C: // Too slow. Give up. return } } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 10 17:26:10 UTC 2024 - 10.7K bytes - Viewed (0) -
pkg/util/goroutinemap/goroutinemap_test.go
Factor: 3, Jitter: 0, Steps: 4, } return wait.ExponentialBackoff(backoff, fn) } func waitChannelWithTimeout(ch <-chan interface{}, timeout time.Duration) error { timer := time.NewTimer(timeout) defer timer.Stop() select { case <-ch: // Success! return nil case <-timer.C: return fmt.Errorf("timeout after %v", timeout) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jan 11 14:09:48 UTC 2017 - 14.9K bytes - Viewed (0)