From 15274e5c9bd5393f67a77200f0669ab00f2ab0ed Mon Sep 17 00:00:00 2001 From: Keith Randall Date: Tue, 16 Sep 2014 12:50:05 -0700 Subject: [PATCH] runtime: make it clear that Goexit cannot be recover'd. LGTM=r R=r, bradfitz, khr CC=golang-codereviews https://golang.org/cl/136660044 --- src/runtime/panic.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/runtime/panic.go b/src/runtime/panic.go index 12c85e7caf..927b6db44b 100644 --- a/src/runtime/panic.go +++ b/src/runtime/panic.go @@ -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, -- 2.50.0