C# waiting_queue based on generic Queue<T> and events
- use
CanEnqueueto detect whetherenqueuewill flush old item - use
CanDequeueto detect whetherdequeuewill throwInvalidOperationExceptionif empty - use
EnqueueWaitAvailableblocksenqueueuntil not full - use
DequeueWaitAvailableblocksdequeueuntil not empty