I provide simple, asynchronous access to a priority heap.

Method __init__ Undocumented
Method shutdown Shuts down the priority heap, firing errbacks of the deferreds of any get requests that will not be fulfilled.
Method get Gets an item with the highest priority (lowest value) from the heap, returning a Deferred that fires when the item becomes available.
Method put Adds the supplied item to the heap, firing the oldest getter deferred if any get calls are pending.
Method cancel Removes all pending items from the heap that the supplied selector function selects. The function must take an item as its sole argument and return True if it selects the item for queue removal.
def __init__(self):
Undocumented
def shutdown(self):

Shuts down the priority heap, firing errbacks of the deferreds of any get requests that will not be fulfilled.

def get(self):

Gets an item with the highest priority (lowest value) from the heap, returning a Deferred that fires when the item becomes available.

def put(self, item):

Adds the supplied item to the heap, firing the oldest getter deferred if any get calls are pending.

def cancel(self, selector):

Removes all pending items from the heap that the supplied selector function selects. The function must take an item as its sole argument and return True if it selects the item for queue removal.

API Documentation for AsynQueue, generated by pydoctor at 2022-11-17 13:13:24.