Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pool ¶
Pool is a pool of contexts whereby the callee context is only cancelled when all callers in the pool are done. Contexts added after the pool is created are also tracked, but will be ignored if the pool is already cancelled.
func NewPool ¶
NewPool creates a new context pool with the given contexts. The returned context is cancelled when all contexts in the pool are done. Added contexts are ignored if the pool is already cancelled or if all current contexts in the pool are done.
func (*Pool) Add ¶
Add adds a context to the pool. The context is ignored if the pool is already cancelled or if all current contexts in the pool are done.
Click to show internal directories.
Click to hide internal directories.