Commit 82ee4e7f authored by Alex Myasoedov's avatar Alex Myasoedov Committed by Brad Fitzpatrick

context: document CancelFunc to be safe for simultaneous use by multiple goroutines

Fixes #32145

Change-Id: If4c9dd3a2af748974141ad6e571f80efcbaad772
Reviewed-on: https://go-review.googlesource.com/c/go/+/177899Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 295c5662
......@@ -220,6 +220,7 @@ func TODO() Context {
// A CancelFunc tells an operation to abandon its work.
// A CancelFunc does not wait for the work to stop.
// A CancelFunc may be called by multiple goroutines simultaneously.
// After the first call, subsequent calls to a CancelFunc do nothing.
type CancelFunc func()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment