forked from go-sylixos/go
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
context: use "canceled" in docs to refer to timed-out contexts
In documentation, we've usually but not always referred to a context with a closed Done channel as "done" rather than "canceled", to avoid ambiguity between a context canceled by calling a CancelFunc and one past its deadline. This actually adds ambiguity, however, since it's common to see references to a "canceled context" that are intended to cover contexts past their deadline. If you see "function F returns if its context is canceled", you can reasonably assume that F will return if its context passes its deadline, unless something says otherwise. Update the context package docs to explicitly state that a context is canceled when its deadline passes. Drop references to contexts becoming "done" and just use "canceled" throughout. Fixes golang#70945 Change-Id: I99fbd800c6049deaa37015a304f7f9d9a84100e1 Reviewed-on: https://go-review.googlesource.com/c/go/+/640095 Reviewed-by: Ian Lance Taylor <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Auto-Submit: Damien Neil <[email protected]>
- Loading branch information
Showing
2 changed files
with
24 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters