Package cancelcond implements a wrapper around sync.Cond that response to context.Context cancellation.
Cond is a wrapper around a sync.Cond that overloads its Wait method to accept a Context. This Context can be cancelled to prematurely terminate the Wait().
New creates a new Context-cancellable Cond.
Wait wraps sync.Cond's Wait() method. It blocks, waiting for the underlying Conn to be signalled. If the Context is cancelled prematurely, Wait() will signal the underlying Cond and unblock it.
Wait must be called while holding the Cond's lock. It yields the lock while it is blocking and reclaims it prior to returning.