{
  "id": "python-queue-table",
  "kind": "table",
  "slug": "python-queue",
  "iil_id": null,
  "note_url": "https://iinventedlight.com/library/notes/python-queue/",
  "title": "Python queue - thread-safe FIFO, LIFO and priority queues with task_done and join",
  "columns": [
    "name",
    "source",
    "detail"
  ],
  "rows": [
    {
      "name": "Queue(maxsize=0)",
      "source": "Python docs",
      "detail": "FIFO: the first tasks added are the first retrieved"
    },
    {
      "name": "LifoQueue(maxsize=0)",
      "source": "Python docs",
      "detail": "LIFO: the most recently added entry first, like a stack"
    },
    {
      "name": "PriorityQueue(maxsize=0)",
      "source": "Python docs",
      "detail": "lowest valued entry first, kept sorted with heapq"
    },
    {
      "name": "SimpleQueue()",
      "source": "Python docs",
      "detail": "unbounded FIFO without task tracking"
    },
    {
      "name": "get_nowait()",
      "source": "Python docs",
      "detail": "on an empty queue raises queue.Empty; put_nowait() on a full queue raises queue.Full."
    },
    {
      "name": "qsize()",
      "source": "Python docs",
      "detail": "is approximate: qsize() > 0 doesn't guarantee that a subsequent get() will not block."
    },
    {
      "name": "shutdown()",
      "source": "Python docs",
      "detail": "(3.13+) stops the queue from growing; later put() calls raise ShutDown."
    }
  ],
  "related_slugs": [
    "python-asyncio-basics"
  ],
  "license": "CC-BY-4.0",
  "source_license": "PSF-2.0 (Python docs); PSF-2.0 (python/cpython (GitHub)); prose restates cited source lines in own words",
  "as_of": "2026-11-18",
  "status": "fill-draft-20261118",
  "note": "Restated from the note's GREEN sources; check those sources before relying on a value."
}