Package contextack extends context.Context with cancellation acknowledgement.
API implementations should provide context value keys for functions which support context. A group of functions may share the same key if only one of them will be called with a given context (including any parent context which was created via WithAck). The functions should call Ack with the key just before exiting.
API clients should call WithAck with the key which represents the function they are about to call. When it's important to wait until the function has finished, the receive channel returned by WithAck can be used.
Ack notifies all subscribers that the operation represented by the key has finished. It's ok to call this even when there are no subscribers.
WithAck returns ctx or a copy of it, and a channel which will be closed when the operation represented by the key has finished.