ray.util.queue.Queue.put#
- Queue.put(item: Any, block: bool = True, timeout: float | None = None) None[source]#
Adds an item to the queue.
If block is True and the queue is full, blocks until the queue is no longer full or until timeout.
There is no guarantee of order if multiple producers put to the same full queue.
- Parameters:
item – The item to enqueue.
block – If True, wait up to
timeoutfor space to become available. If False, raiseFullimmediately when the queue is full.timeout – Maximum number of seconds to wait when
blockis True.Nonewaits forever.
- Raises:
Full – if the queue is full and blocking is False.
Full – if the queue is full, blocking is True, and it timed out.
ValueError – if timeout is negative.