Skip to content

Commit 6ceb902

Browse files
committed
runtime: name Goexit task exit explicitly
1 parent 82ae752 commit 6ceb902

5 files changed

Lines changed: 7 additions & 7 deletions

File tree

src/internal/task/task_exit.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ func addLiveTask(t *Task) {
1717
atomic.AddUint32(&liveTasks, 1)
1818
}
1919

20-
// Exit exits the current task because runtime.Goexit was called.
21-
func Exit() {
20+
// Goexit exits the current task because runtime.Goexit was called.
21+
func Goexit() {
2222
exit(true)
2323
}
2424

src/internal/task/task_threads.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,9 @@ func otherTasks(current *Task) uint32 {
161161
return activeTaskCount - 1
162162
}
163163

164-
// Exit exits the current task. If this is the main task and there are no other
164+
// Goexit exits the current task. If this is the main task and there are no other
165165
// goroutines, it reports a deadlock.
166-
func Exit() {
166+
func Goexit() {
167167
t := Current()
168168
if t == &mainTask {
169169
activeTaskLock.Lock()

src/runtime/scheduler_cooperative.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ func goexit() {
8989
if finalizerIdleGC != nil {
9090
task.MarkFinishing()
9191
}
92-
task.Exit()
92+
task.Goexit()
9393
}
9494

9595
// Add this task to the end of the run queue.

src/runtime/scheduler_cores.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func deadlock() {
3333
}
3434

3535
func goexit() {
36-
task.Exit()
36+
task.Goexit()
3737
}
3838

3939
// Mark the given task as ready to resume.

src/runtime/scheduler_threads.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func deadlock() {
4444
}
4545

4646
func goexit() {
47-
task.Exit()
47+
task.Goexit()
4848
}
4949

5050
func scheduleTask(t *task.Task) {

0 commit comments

Comments
 (0)