]> Cypherpunks.ru repositories - gostls13.git/commitdiff
context: document CancelFunc to be safe for simultaneous use by multiple goroutines
authorAlex Myasoedov <msoedov@gmail.com>
Mon, 20 May 2019 15:15:05 +0000 (18:15 +0300)
committerBrad Fitzpatrick <bradfitz@golang.org>
Mon, 20 May 2019 16:08:56 +0000 (16:08 +0000)
Fixes #32145

Change-Id: If4c9dd3a2af748974141ad6e571f80efcbaad772
Reviewed-on: https://go-review.googlesource.com/c/go/+/177899
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/context/context.go

index 0f36881b1eb9cb47ff7b901c75aefacecd6227e5..05d01d0294adaf9c99d0cd520e621427213821e4 100644 (file)
@@ -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()