File tree 1 file changed +4
-0
lines changed 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -1151,6 +1151,7 @@ func unminitSignals() {
1151
1151
// blockableSig reports whether sig may be blocked by the signal mask.
1152
1152
// We never want to block the signals marked _SigUnblock;
1153
1153
// these are the synchronous signals that turn into a Go panic.
1154
+ // We never want to block the preemption signal if it is being used.
1154
1155
// In a Go program--not a c-archive/c-shared--we never want to block
1155
1156
// the signals marked _SigKill or _SigThrow, as otherwise it's possible
1156
1157
// for all running threads to block them and delay their delivery until
@@ -1161,6 +1162,9 @@ func blockableSig(sig uint32) bool {
1161
1162
if flags & _SigUnblock != 0 {
1162
1163
return false
1163
1164
}
1165
+ if sig == sigPreempt && preemptMSupported && debug .asyncpreemptoff == 0 {
1166
+ return false
1167
+ }
1164
1168
if isarchive || islibrary {
1165
1169
return true
1166
1170
}
You can’t perform that action at this time.
0 commit comments