lstautorta.utils.queue
Functions:
| Name | Description |
|---|---|
get_all_non_blocking |
Get all items present in the queue, non-blocking. |
process_all_items |
Empty |
get_all_non_blocking
process_all_items
Empty q and apply process_item_fct on all items not in processed_items with kwargs from process_item_fct_extra_kwargs
Warnings
If the queue is filled faster than this function empties it, this will create an infinite list!
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Queue[Any]
|
queue which items will be processed |
required |
processed_items
|
set[Any]
|
Set of items that should not be processed. |
required |
process_item_fct
|
Callable[..., None]
|
Function to apply to the queue items |
required |
process_item_fct_extra_kwargs
|
Dict[str, Any]
|
Extra kwargs to pass to |
required |
Returns:
| Type | Description |
|---|---|
int
|
The number of processed items. |