queue.Full
Prev: queue.Empty | Up: queue | Next: queue.LifoQueue
Rel: queue.Empty, queue.LifoQueue, queue.PriorityQueue, queue.Queue
Ref: docs.python.org โ queue.Full
Tags: #public #python3 #stdlib #queue
Import
import queue
from queue import Full
Signature & Overview
queue.Full(...)
Exception raised by Queue.put(block=0)/put_nowait().
Methods & Attributes
Full.add_note(self, note, /)โ Add a note to the exceptionFull.with_traceback(self, tb, /)โ Set self.traceback to tb and return self.
Usage
import queue
q: queue.Queue[int] = queue.Queue(maxsize=1)
q.put(1)
try:
q.put_nowait(2)
except queue.Full:
assert q.full()
Gotchas
- Only possible when
maxsize > 0: Unbounded queues (maxsize=0, the default) never raisequeue.Full.
REPL Inspect
from queue import Full
help(Full)
Linked from
Related notes
- tuts/python3/stdlib_module/queue/Empty Linked here; links to this page; shared tags: #queue, #stdlib
- tuts/python3/stdlib_module/queue/LifoQueue Linked here; links to this page; shared tags: #queue, #stdlib
- tuts/python3/stdlib_module/queue/PriorityQueue Linked here; links to this page; shared tags: #queue, #stdlib
- tuts/python3/stdlib_module/queue/Queue Linked here; links to this page; shared tags: #queue, #stdlib
- tuts/python3/stdlib_module/queue/ShutDown links to this page; shared tags: #queue, #stdlib
- tuts/python3/stdlib_module/queue/SimpleQueue links to this page; shared tags: #queue, #stdlib
- tuts/python3/stdlib_module/queue links to this page; shared tags: #stdlib
- tuts/c/stdlib shared tags: #stdlib
- tuts/c/stdlib/assert shared tags: #stdlib
- tuts/c/stdlib/assert/assert shared tags: #stdlib