- 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
推薦閱讀
- Kibana Essentials
- 大學(xué)計(jì)算機(jī)應(yīng)用基礎(chǔ)實(shí)踐教程
- Java編程指南:基礎(chǔ)知識、類庫應(yīng)用及案例設(shè)計(jì)
- JavaScript by Example
- 鋒利的SQL(第2版)
- 深入淺出RxJS
- 學(xué)Python也可以這么有趣
- C/C++數(shù)據(jù)結(jié)構(gòu)與算法速學(xué)速用大辭典
- Hands-On GUI Programming with C++ and Qt5
- Hands-On Kubernetes on Windows
- PrimeFaces Blueprints
- UML2面向?qū)ο蠓治雠c設(shè)計(jì)(第2版)
- Web開發(fā)的平民英雄:PHP+MySQL
- Android應(yīng)用程序設(shè)計(jì)
- HTML5程序開發(fā)范例寶典