Feature request: add an optional argument to allow put
to place at specific points in the queue. For example:
def put(self, item: Any, before: int | None = None, after: int | None = None) -> int | None:
"""Put an item onto the queue.
By default, items are placed onto the end of the queue.
Args:
item (Any): The item to enqueue.
before: (int | None, optional): The id of the item to place this item before; may not be used with `after`. Defaults to None.
after: (int | None, optional): The id of the item to place this item after; may not be used with `before`. Defaults to None.
Raises:
ValueError: if both `before` and `after` are set in the same call.
"""
# ...