diff options
author | Alex Myasoedov <msoedov@gmail.com> | 2019-05-20 18:15:05 +0300 |
---|---|---|
committer | Brad Fitzpatrick <bradfitz@golang.org> | 2019-05-20 16:08:56 +0000 |
commit | 82ee4e7f78bf34da31e1d050529ab82dc03cf13a (patch) | |
tree | 4029de73cbe4653bb313bd5179329f1b68a3b675 /src/context | |
parent | 295c56627afaa9db19ee7fcb0df33c1d6fa3c9fa (diff) | |
download | go-82ee4e7f78bf34da31e1d050529ab82dc03cf13a.tar.gz go-82ee4e7f78bf34da31e1d050529ab82dc03cf13a.zip |
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>
Diffstat (limited to 'src/context')
-rw-r--r-- | src/context/context.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/context/context.go b/src/context/context.go index 0f36881b1e..05d01d0294 100644 --- a/src/context/context.go +++ b/src/context/context.go @@ -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() |