Adding methods cancel and cancel_all (akin to notify and notify_all to queue.Queue to support cancelling a get (and potentially a put) operation
Awaiting on get of an asyncio can be cancelled. But waiting on the get of a queue.Queue cannot be cancelled. A usual pattern is sending None to the queue, but this is simply a convention and introduces the restriction that None stops being a valid value returned by get
This would be implemented by means of a threading.Semaphore which would be released by the method cancel(n=1). A waiting get would check if the Semaphore can be acquired (non-blocking check) and if True it would raise a (new) queue.Cancelled exception.