mirror of
https://github.com/golang/go
synced 2024-11-12 02:00:23 -07:00
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/+/177899 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
295c56627a
commit
82ee4e7f78
@ -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()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user