- Mastering Concurrency in Python
- Quan Nguyen
- 117字
- 2021-06-10 19:24:03
The queue module
The queue module in Python provides a simple implementation of the queue data structure. Each queue in the queue.Queue class can hold a specific amount of element, and can have the following methods as its high-level API:
- get(): This method returns the next element of the calling queue object and removes it from the queue object
- put(): This method adds a new element to the calling queue object
- qsize(): This method returns the number of current elements in the calling queue object (that is, its size)
- empty(): This method returns a Boolean, indicating whether the calling queue object is empty
- full(): This method returns a Boolean, indicating whether the calling queue object is full
推薦閱讀
- ExtGWT Rich Internet Application Cookbook
- Spring 5企業(yè)級(jí)開發(fā)實(shí)戰(zhàn)
- Python網(wǎng)絡(luò)爬蟲從入門到實(shí)踐(第2版)
- 軟件測試工程師面試秘籍
- C語言程序設(shè)計(jì)實(shí)踐教程
- 微信公眾平臺(tái)開發(fā):從零基礎(chǔ)到ThinkPHP5高性能框架實(shí)踐
- C++新經(jīng)典
- Creating Mobile Apps with jQuery Mobile(Second Edition)
- 軟件測試實(shí)用教程
- INSTANT Adobe Edge Inspect Starter
- Delphi開發(fā)典型模塊大全(修訂版)
- HTML5游戲開發(fā)實(shí)戰(zhàn)
- Java EE基礎(chǔ)實(shí)用教程
- 深度剖析ApacheDubbo核心技術(shù)內(nèi)幕
- 瘋狂Java講義精粹