]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: make it clear that Goexit cannot be recover'd.
authorKeith Randall <khr@golang.org>
Tue, 16 Sep 2014 19:50:05 +0000 (12:50 -0700)
committerKeith Randall <khr@golang.org>
Tue, 16 Sep 2014 19:50:05 +0000 (12:50 -0700)
LGTM=r
R=r, bradfitz, khr
CC=golang-codereviews
https://golang.org/cl/136660044

src/runtime/panic.go

index 12c85e7caf7556a5bcd13d8acee5ffa3d3a78ca1..927b6db44bc3ff32bf378b360813daa0bba93f69 100644 (file)
@@ -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,