Python function
drain_queue
drain_queue()โ
max.interfaces.drain_queue(pull_queue, max_items=None)
Remove and return items from the queue without blocking.
This method is expected to return an empty list if the queue is empty. If max_items is specified, at most that many items will be returned.
-
Parameters:
-
- pull_queue (MAXPullQueue[PullItemType]) โ The queue to drain items from.
- max_items (int | None) โ Maximum number of items to return. If None, returns all items.
-
Returns:
-
List of items removed from the queue, limited by max_items if specified.
-
Return type:
-
list[PullItemType]
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!