Notify will wake up all waiters of cond when the context is cancelled.
To use this, callers should call Notify and then check ctx.Err in their
condition loop for the condition variable.
The return value should be deferred to properly clean up resources associated
with this function.