最終更新:2021-08-23 (月) 15:34:17 (976d)  

Python/queue
Top / Python / queue

https://docs.python.org/ja/3/library/queue.html

https://docs.python.org/3/library/queue.html

ソースコード

クラス

主なクラス

  • Python/queue.Queue(maxsize=0)FIFO
    Python/queue.LifoQueue?(maxsize=0)LIFO? (スタック)
    Python/queue.PriorityQueue?(maxsize=0)エントリは(heapq モジュールを利用して)ソートされ、 最も低い値のエントリが最初に取り出されます
  • Internally, those three types of queues use locks to temporarily block competing threads; however, they are not designed to handle reentrancy within a thread.

その他

例外

  • Python/queue.Empty?空の Queue オブジェクトで、非ブロックメソッド get() (または get_nowait()) が呼ばれたとき、送出される
    Python/queue.Full?満杯の Queue オブジェクトで、非ブロックメソッド put() (または put_nowait()) が呼ばれたとき、送出される