💾 Archived View for tris.fyi › pydoc › _queue captured on 2023-04-26 at 13:34:08. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2022-01-08)
-=-=-=-=-=-=-
C implementation of the Python queue module. This module is an implementation detail, please do not use it directly.
Exception raised by Queue.get(block=0)/get_nowait().
with_traceback(...) Exception.with_traceback(tb) -- set self.__traceback__ to tb and return self.
args = <attribute 'args' of 'BaseException' objects>
Simple, unbounded, reentrant FIFO queue.
empty(self, /) Return True if the queue is empty, False otherwise (not reliable!).
get(self, /, block=True, timeout=None) Remove and return an item from the queue. If optional args 'block' is true and 'timeout' is None (the default), block if necessary until an item is available. If 'timeout' is a non-negative number, it blocks at most 'timeout' seconds and raises the Empty exception if no item was available within that time. Otherwise ('block' is false), return an item if one is immediately available, else raise the Empty exception ('timeout' is ignored in that case).
get_nowait(self, /) Remove and return an item from the queue without blocking. Only get an item if one is immediately available. Otherwise raise the Empty exception.
put(self, /, item, block=True, timeout=None) Put the item on the queue. The optional 'block' and 'timeout' arguments are ignored, as this method never blocks. They are provided for compatibility with the Queue class.
put_nowait(self, /, item) Put an item into the queue without blocking. This is exactly equivalent to `put(item)` and is only provided for compatibility with the Queue class.
qsize(self, /) Return the approximate size of the queue (not reliable!).