- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 192 for newTimer (0.43 sec)
-
staging/src/k8s.io/apimachinery/pkg/util/httpstream/spdy/connection_test.go
} spdyConn.Close() raw := spdyConn.(*connection).conn if err := raw.Wait(15 * time.Second); err != nil { t.Fatalf("client: timed out waiting for connection closure: %v", err) } expired := time.NewTimer(15 * time.Second) defer expired.Stop() i := 0 for { select { case <-expired.C: t.Fatalf("timed out waiting for proxy and/or server closure") case <-serverDone: i++ case <-proxyDone:
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Mar 01 11:58:57 UTC 2023 - 7.9K bytes - Viewed (0) -
src/syscall/exec_unix_test.go
go func() { cmd.proc.SysProcAttr = &syscall.SysProcAttr{ Ctty: ttyFD, Foreground: true, } cmd.Start() cmd.Stop() close(ch2) }() timer := time.NewTimer(30 * time.Second) defer timer.Stop() for { select { case sig := <-ch1: t.Errorf("unexpected signal %v", sig) case <-ch2: // Success. return case <-timer.C:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 22 04:41:27 UTC 2024 - 7.9K bytes - Viewed (0) -
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/site-replication-utils.go
if st == ResyncFailed { m.FailedBuckets = append(m.FailedBuckets, b) } } return &m } // save in-memory stats to disk func (sm *siteResyncMetrics) save(ctx context.Context) { sTimer := time.NewTimer(siteResyncSaveInterval) defer sTimer.Stop() for { select { case <-sTimer.C: if globalSiteReplicationSys.isEnabled() { sm.Lock() wg := sync.WaitGroup{}
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Thu Jan 18 07:03:17 UTC 2024 - 8.9K bytes - Viewed (0) -
src/go/internal/gccgoimporter/testdata/time.gox
type <type 18>; const Nanosecond <type 1> = 1 ; func NewTicker (d <type 1>) <type 45 *<type 46 "Ticker" <type 47 struct { C <type 48 chan <- <type 3>>; .time.r <type 36>; }> func (t <type 49 *<type 46>>) Stop (); >>; func NewTimer (d <type 1>) <type 32>; const November <type 18> = 11 ; func Now () <type 3>; const October <type 18> = 10 ; func Parse (layout <type -16>, value <type -16>) (? <type 3>, ? <type -19>);
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Sep 30 21:33:51 UTC 2021 - 7.3K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/plugin/pkg/audit/buffered/buffered.go
defer close(b.buffer) var ( maxWaitChan <-chan time.Time maxWaitTimer *time.Timer ) // Only use max wait batching if batching is enabled. if b.maxBatchSize > 1 { maxWaitTimer = time.NewTimer(b.maxBatchWait) maxWaitChan = maxWaitTimer.C defer maxWaitTimer.Stop() } for { func() { // Recover from any panics caused by this function so a panic in the
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jul 26 17:14:05 UTC 2022 - 9.1K 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) -
test/typeparam/chans.go
want := []int{2} if !_SliceEqual(got, want) { panic(fmt.Sprintf("_Filter returned %v, want %v", got, want)) } } func TestSink() { c := _Sink[int](context.Background()) after := time.NewTimer(time.Minute) defer after.Stop() send := func(v int) { select { case c <- v: case <-after.C: panic("timed out sending to _Sink") } } send(1) send(2) send(3) close(c)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 01 19:45:34 UTC 2022 - 8.4K bytes - Viewed (0) -
pkg/util/async/bounded_frequency_runner.go
func NewBoundedFrequencyRunner(name string, fn func(), minInterval, maxInterval time.Duration, burstRuns int) *BoundedFrequencyRunner { timer := &realTimer{timer: time.NewTimer(0)} // will tick immediately <-timer.C() // consume the first tick return construct(name, fn, minInterval, maxInterval, burstRuns, timer) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Nov 15 09:36:26 UTC 2022 - 9.4K bytes - Viewed (0)