- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 62 for afterFunc (0.14 sec)
-
src/internal/poll/fd_plan9.go
} fd.wtimedout = false } if !t.IsZero() && d > 0 { // Interrupt I/O operation once timer has expired if mode == 'r' || mode == 'r'+'w' { var timer *time.Timer timer = time.AfterFunc(d, func() { fd.rmu.Lock() defer fd.rmu.Unlock() if fd.rtimer != timer { // deadline was changed return } fd.rtimedout = true if fd.raio != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 06 14:00:54 UTC 2024 - 5.4K bytes - Viewed (0) -
pkg/ctrlz/home.go
fw.RenderHTML(w, errorTmpl, nil) } }) _ = router.NewRoute().Methods("PUT").Path("/homej/exit").HandlerFunc(func(w http.ResponseWriter, req *http.Request) { w.WriteHeader(http.StatusAccepted) time.AfterFunc(1*time.Second, func() { os.Exit(0) }) })
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed May 24 14:06:41 UTC 2023 - 2.5K bytes - Viewed (0) -
src/crypto/rand/rand_unix.go
func (r *reader) Read(b []byte) (n int, err error) { boring.Unreachable() if r.used.CompareAndSwap(0, 1) { // First use of randomness. Start timer to warn about // being blocked on entropy not being available. t := time.AfterFunc(time.Minute, warnBlocked) defer t.Stop() } if altGetRandom != nil && altGetRandom(b) == nil { return len(b), nil } if r.used.Load() != 2 { r.mu.Lock() if r.used.Load() != 2 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Oct 01 08:32:46 UTC 2022 - 1.8K bytes - Viewed (0) -
src/cmd/trace/testdata/testprog/main.go
func blockingSyscall(d time.Duration, done chan<- error) { r, w, err := os.Pipe() if err != nil { done <- err return } start := time.Now() msg := []byte("hello") time.AfterFunc(d, func() { w.Write(msg) }) _, err = syscall.Read(int(r.Fd()), make([]byte, len(msg))) if err == nil && time.Since(start) < d { err = fmt.Errorf("syscall returned too early: want=%s got=%s", d, time.Since(start)) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 17:15:58 UTC 2024 - 2.5K bytes - Viewed (0) -
pkg/queue/instance_test.go
go func() { q.Run(stop) signal <- struct{}{} }() q.Push(func() error { t.Log("mock exec") return nil }) // mock queue block wait cond signal time.AfterFunc(10*time.Millisecond, func() { close(stop) }) select { case <-time.After(200 * time.Millisecond): t.Error("close stop, method exit timeout.") case <-signal: t.Log("queue return.") } }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri Jul 21 16:30:36 UTC 2023 - 3.4K bytes - Viewed (0) -
pkg/kube/multicluster/cluster.go
func (c *Cluster) Run(mesh mesh.Watcher, handlers []handler, action ACTION) { if features.RemoteClusterTimeout > 0 { time.AfterFunc(features.RemoteClusterTimeout, func() { if !c.initialSync.Load() { log.Errorf("remote cluster %s failed to sync after %v", c.ID, features.RemoteClusterTimeout) timeouts.With(clusterLabel.Value(string(c.ID))).Increment()
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Mar 06 02:13:10 UTC 2024 - 3.8K bytes - Viewed (0) -
pkg/controller/tainteviction/timed_workers.go
err := f(ctx, fireAt, args) if err != nil { logger.Error(err, "TaintEvictionController: timed worker failed") } } if delay <= 0 { go fWithErrorLogging() return nil } timer := clock.AfterFunc(delay, fWithErrorLogging) return &TimedWorker{ WorkItem: args, CreatedAt: createdAt, FireAt: fireAt, Timer: timer, } } // Cancel cancels the execution of function by the `TimedWorker`
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Oct 30 12:23:56 UTC 2023 - 4.8K bytes - Viewed (0) -
pkg/queue/instance.go
if shuttingdown { return false } // Run the task. if err := task.task(); err != nil { delay := q.delay log.Infof("Work item handle failed (%v), retry after delay %v", err, delay) time.AfterFunc(delay, func() { q.Push(task.task) }) } q.metrics.workDuration.Record(time.Since(task.startTime).Seconds()) return true } func (q *queueImpl) HasSynced() bool {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri Jul 21 16:30:36 UTC 2023 - 4.1K bytes - Viewed (0) -
cni/pkg/nodeagent/ztunnelserver.go
}, pods: pods, }, nil } func (z *ztunnelServer) Close() error { return z.listener.Close() } func (z *ztunnelServer) Run(ctx context.Context) { context.AfterFunc(ctx, func() { _ = z.Close() }) for { log.Debug("accepting conn") conn, err := z.accept() if err != nil { if errors.Is(err, net.ErrClosed) { log.Debug("listener closed - returning")
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu May 23 22:07:03 UTC 2024 - 12.3K bytes - Viewed (0) -
pilot/pkg/xds/adstest.go
a.cancelOnce.Do(func() { a.cancelContext() _ = a.client.CloseSend() if a.conn != nil { _ = a.conn.Close() } }) } func (a *AdsTest) adsReceiveChannel() { context.AfterFunc(a.context, a.Cleanup) for { resp, err := a.client.Recv() if err != nil { if isUnexpectedError(err) { log.Warnf("ads received error: %v", err) } select { case a.error <- err:
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Sun Feb 04 03:39:42 UTC 2024 - 6K bytes - Viewed (0)