diff --git a/src/runtime/signal_unix.go b/src/runtime/signal_unix.go index ba3e21ae2e..dd6d79f8ec 100644 --- a/src/runtime/signal_unix.go +++ b/src/runtime/signal_unix.go @@ -536,7 +536,7 @@ func sighandler(sig uint32, info *siginfo, ctxt unsafe.Pointer, gp *g) { return } - if sig == sigPreempt { + if sig == sigPreempt && debug.asyncpreemptoff == 0 { // Might be a preemption signal. doSigPreempt(gp, c) // Even if this was definitely a preemption signal, it