- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 66 for afterFunc (0.19 sec)
-
src/os/fifo_test.go
t.Fatalf("Error writing to fifo: %v", err) } // Close the writer after a short delay to open a gap for the reader // of FIFO to fall into polling. See https://go.dev/issue/66239#issuecomment-1987620476 time.AfterFunc(200*time.Millisecond, func() { if err := w.Close(); err != nil { t.Errorf("Error closing writer: %v", err) } }) buf := make([]byte, len(data)) n, err := io.ReadAtLeast(r, buf, len(data))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 19 11:47:23 UTC 2024 - 6.1K bytes - Viewed (0) -
src/net/http/httputil/reverseproxy.go
} if m.flushPending { return } if m.t == nil { m.t = time.AfterFunc(m.latency, m.delayedFlush) } else { m.t.Reset(m.latency) } m.flushPending = true return } func (m *maxLatencyWriter) delayedFlush() { m.mu.Lock() defer m.mu.Unlock() if !m.flushPending { // if stop was called but AfterFunc already started this goroutine return } m.flush() m.flushPending = false
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Feb 27 23:37:42 UTC 2024 - 24.9K bytes - Viewed (0) -
src/go/internal/gccgoimporter/testdata/time.gox
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Sep 30 21:33:51 UTC 2021 - 7.3K bytes - Viewed (0) -
pkg/adsc/delta.go
func (c *Client) reconnect() { c.mutex.RLock() if c.closed { c.mutex.RUnlock() return } c.mutex.RUnlock() err := c.Run(context.Background()) if err != nil { time.AfterFunc(c.cfg.BackoffPolicy.NextBackOff(), c.reconnect) } else if c.cfg.BackoffPolicy != nil { // We connected, so reset the backoff c.cfg.BackoffPolicy.Reset() } } type Option func(c *Client)
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri Feb 02 09:32:41 UTC 2024 - 20.4K bytes - Viewed (0) -
src/cmd/cgo/internal/testcarchive/carchive_test.go
cmd = exec.Command(argv[0], argv[1:]...) sb := new(strings.Builder) cmd.Stdout = sb cmd.Stderr = sb if err := cmd.Start(); err != nil { t.Fatal(err) } timer := time.AfterFunc(time.Minute, func() { t.Error("test program timed out") cmd.Process.Kill() }, ) defer timer.Stop() err = cmd.Wait() t.Logf("%v\n%s", cmd.Args, sb) if err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 12 00:43:51 UTC 2023 - 34.8K bytes - Viewed (0) -
src/syscall/syscall_unix_test.go
if !ok { t.Fatalf("unexpected FileConn type; expected UnixConn, got %T", c) } buf := make([]byte, 32) // expect 1 byte oob := make([]byte, 32) // expect 24 bytes closeUnix := time.AfterFunc(5*time.Second, func() { t.Logf("timeout reading from unix socket") uc.Close() }) _, oobn, _, _, err := uc.ReadMsgUnix(buf, oob) if err != nil { t.Fatalf("ReadMsgUnix: %v", err) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 29 16:24:51 UTC 2022 - 9.4K bytes - Viewed (0) -
src/runtime/crash_unix_test.go
want, got = runtime.WaitForSigusr1(r, w, func(mp *runtime.M) { ready <- mp }) runtime.UnlockOSThread() wg.Done() }() waitingM := <-ready runtime.SendSigusr1(waitingM) timer := time.AfterFunc(time.Second, func() { // Write 1 to tell WaitForSigusr1 that we timed out. bw := byte(1) if n := runtime.Write(uintptr(w), unsafe.Pointer(&bw), 1); n != 1 { t.Errorf("pipe write failed: %d", n) } })
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 12 20:11:47 UTC 2023 - 9.2K bytes - Viewed (0) -
src/net/http/h2_bundle.go
return s.group.NewTimer(d) } return http2timeTimer{time.NewTimer(d)} } // afterFunc creates a new time.AfterFunc timer, or a synthetic timer in tests. func (s *http2Server) afterFunc(d time.Duration, f func()) http2timer { if s.group != nil { return s.group.AfterFunc(d, f) } return http2timeTimer{time.AfterFunc(d, f)} } func (s *http2Server) initialConnRecvWindowSize() int32 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 04 16:19:04 UTC 2024 - 364.1K bytes - Viewed (0) -
src/runtime/stack_test.go
growStack(&progress) }) setFinalizerTime := time.Now() s = nil if d, ok := t.Deadline(); ok { // Pad the timeout by an arbitrary 5% to give the AfterFunc time to run. timeout := time.Until(d) * 19 / 20 timer := time.AfterFunc(timeout, func() { // Panic — instead of calling t.Error and returning from the test — so // that we get a useful goroutine dump if the test times out, especially
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jun 14 00:03:57 UTC 2023 - 23.1K bytes - Viewed (0) -
src/net/http/httptest/server.go
// in StateActive. if st == http.StateIdle || st == http.StateNew { s.closeConn(c) } } // If this server doesn't shut down in 5 seconds, tell the user why. t := time.AfterFunc(5*time.Second, s.logCloseHangDebugInfo) defer t.Stop() } s.mu.Unlock() // Not part of httptest.Server's correctness, but assume most // users of httptest.Server will be using the standard
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 10 17:26:10 UTC 2024 - 10.7K bytes - Viewed (0)