You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
runtime: signals are not delivered under the threads scheduler when the program blocks on I/O #5758
Under the threads scheduler, the default on Linux and macOS, a program blocked on I/O, channels or mutexes never observes an OS signal. A server that calls signal.Notify(c, os.Interrupt) and then waits on the channel ignores Ctrl+C indefinitely and has to be killed.
checkSignals() is only reached from sleepTicks(), so a signal is noticed only while some goroutine happens to be inside time.Sleep. time.NewTicker and time.After go through the timer queue instead. The cooperative and multicore schedulers call checkSignals() from their idle loop, and the threads scheduler has no such loop, so nothing consumes signalFutex and resumes signal_recv.
PR #5530 starts a signal watcher thread on the threads scheduler.
Activity