queue module
suggest changeThe queue module implements multi-producer, multi-consumer queues. It is especially useful in threaded programming when information must be exchanged safely between multiple threads. In Python 2 the module was named Queue.
The queue module provides these queue types:
- Queue
- LifoQueue
- PriorityQueue
- SimpleQueue, added in Python 3.7
Exceptions that can be raised:
- Full (queue overflow)
- Empty (queue underflow)
- ShutDown, raised on Python 3.14 when a shut-down queue is used
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents