(self, event)
Remove an event from the queue.

        This must be presented the ID as returned by enter().
        If the event is not in the queue, this raises ValueError.
Remove an event from the queue.
Remove an event from the queue .
def cancel(self, event):
        """Remove an event from the queue.

        This must be presented the ID as returned by enter().
        If the event is not in the queue, this raises ValueError.

        """
        with self._lock:
            self._queue.remove(event)
            heapq.heapify(self._queue)
def cancel ( self , event ) : with self . _lock : self . _queue . remove ( event ) heapq . heapify ( self . _queue )