We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c9cd1dd commit 25da274Copy full SHA for 25da274
src/runtime/mgc.go
@@ -1093,6 +1093,12 @@ top:
1093
// as the GC marking phase progresses. It returns false for leaked goroutines, or for
1094
// goroutines which are not yet computed as possibly runnable by the GC.
1095
func (gp *g) isMaybeRunnable() bool {
1096
+ // Check whether the goroutine is actually in a waiting state first.
1097
+ if readgstatus(gp) != _Gwaiting {
1098
+ // If the goroutine is not waiting, then clearly it is maybe runnable.
1099
+ return true
1100
+ }
1101
+
1102
switch gp.waitreason {
1103
case waitReasonSelectNoCases,
1104
waitReasonChanSendNilChan,
0 commit comments