C# waiting_queue based on generic Queue<T>
and events
- use
CanEnqueue
to detect whetherenqueue
will flush old item - use
CanDequeue
to detect whetherdequeue
will throwInvalidOperationException
if empty - use
EnqueueWaitAvailable
blocksenqueue
until not full - use
DequeueWaitAvailable
blocksdequeue
until not empty