Skip to content

Commit a3360fe

Browse files
committed
runtime: move mainExited boolean
This variable is only necessary on the cooperative scheduler. It is not actually used on the "none" scheduler, so can be removed there.
1 parent bf8345c commit a3360fe

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

src/runtime/scheduler.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import "internal/task"
44

55
const schedulerDebug = false
66

7-
var mainExited bool
8-
97
var timerQueue *timerNode
108

119
// Simple logging, for debugging.

src/runtime/scheduler_cooperative.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ const hasScheduler = true
2727
// concurrency, it does not have parallelism.
2828
const hasParallelism = false
2929

30+
var mainExited bool
31+
3032
// Queues used by the scheduler.
3133
var (
3234
runqueue task.Queue

src/runtime/scheduler_none.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ func run() {
1616
initRand()
1717
initAll()
1818
callMain()
19-
mainExited = true
2019
}
2120

2221
//go:linkname sleep time.Sleep

0 commit comments

Comments
 (0)