Python class
MAXPullQueue
MAXPullQueueโ
class max.interfaces.MAXPullQueue(*args, **kwargs)
Bases: Protocol, Generic[PullItemType]
Protocol for a minimal, non-blocking pull queue interface in MAX.
This protocol defines the contract for a queue that supports non-blocking get operations for retrieving items. It is generic over the item type and designed for scenarios where the caller must be immediately notified if no items are available rather than waiting for items to arrive.
The protocol is intended for consumer-side queue operations where immediate feedback about queue state is critical for proper flow control and error handling.
get_nowait()โ
get_nowait()
Remove and return an item from the queue without blocking.
This method is expected to raise queue.Empty if no item is available to retrieve from the queue.
-
Returns:
-
The item removed from the queue.
-
Raises:
-
queue.Empty โ If the queue is empty and no item can be retrieved.
-
Return type:
-
PullItemType
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!