- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for syncTimer (0.21 sec)
-
src/time/sleep.go
func Sleep(d Duration) var asynctimerchan = godebug.New("asynctimerchan") // syncTimer returns c as an unsafe.Pointer, for passing to newTimer. // If the GODEBUG asynctimerchan has disabled the async timer chan // code, then syncTimer always returns nil, to disable the special // channel code paths in the runtime. func syncTimer(c chan Time) unsafe.Pointer { // If asynctimerchan=1, we don't even tell the runtime
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 04 14:21:30 UTC 2024 - 8.5K bytes - Viewed (0) -
src/time/tick.go
// If the client falls behind while reading, we drop ticks // on the floor until the client catches up. c := make(chan Time, 1) t := (*Ticker)(unsafe.Pointer(newTimer(when(d), int64(d), sendTime, c, syncTimer(c)))) t.C = c return t } // Stop turns off a ticker. After Stop, no more ticks will be sent. // Stop does not close the channel, to prevent a concurrent goroutine
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 04 14:21:30 UTC 2024 - 3.6K bytes - Viewed (0) -
src/time/tick_test.go
default: case <-C: return } } t.Errorf("missing tick") } assertLen := func() { t.Helper() if synctimerchan { if n := len(C); n != 0 { t.Errorf("synctimer has len(C) = %d, want 0 (always)", n) } return } var n int if n = len(C); n == 1 { return } for range tries { Sleep(sched) if n = len(C); n == 1 { return
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 11 17:10:37 UTC 2024 - 14.7K bytes - Viewed (0)