Skip to content

Commit

Permalink
runtime: make it clear that Goexit cannot be recover'd.
Browse files Browse the repository at this point in the history
LGTM=r
R=r, bradfitz, khr
CC=golang-codereviews
https://golang.org/cl/136660044
  • Loading branch information
randall77 authored and wheatman committed Jul 6, 2018
1 parent f993481 commit 7b9b33b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/runtime/panic.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,8 @@ func deferreturn(arg0 uintptr) {
}

// Goexit terminates the goroutine that calls it. No other goroutine is affected.
// Goexit runs all deferred calls before terminating the goroutine.
// Goexit runs all deferred calls before terminating the goroutine. Because Goexit
// is not panic, however, any recover calls in those deferred functions will return nil.
//
// Calling Goexit from the main goroutine terminates that goroutine
// without func main returning. Since func main has not returned,
Expand Down

0 comments on commit 7b9b33b

Please sign in to comment.