Documentation
¶
Overview ¶
Package contextutil implements some context utility functions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MultiContext ¶
MultiContext creates a new context that shares state from all the given contexts. Deadline() returns the smallest Deadline() among all of the given contexts. Done() returns a channel that is closed when any of the given context's Done channels are closed and Err() returns its associated Err(). Value() returns the first non-nil value from the given contexts, in the order given.
Canceling this context releases resources associated with it, so code should call the returned cancel function as soon as the operations running in this Context complete.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.