blob: 727c7f5f2c44b695f23f595c1122f9ebd0fce937 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
package runtime
import "internal/task"
const schedulerDebug = false
var mainExited bool
// Simple logging, for debugging.
func scheduleLog(msg string) {
if schedulerDebug {
println("---", msg)
}
}
// Simple logging with a task pointer, for debugging.
func scheduleLogTask(msg string, t *task.Task) {
if schedulerDebug {
println("---", msg, t)
}
}
// Simple logging with a channel and task pointer.
func scheduleLogChan(msg string, ch *channel, t *task.Task) {
if schedulerDebug {
println("---", msg, ch, t)
}
}
// Goexit terminates the currently running goroutine. No other goroutines are affected.
func Goexit() {
panicOrGoexit(nil, panicGoexit)
}
|