- 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
推薦閱讀
- Python量化投資指南:基礎(chǔ)、數(shù)據(jù)與實戰(zhàn)
- PHP基礎(chǔ)案例教程
- 碼上行動:零基礎(chǔ)學(xué)會Python編程(ChatGPT版)
- aelf區(qū)塊鏈應(yīng)用架構(gòu)指南
- Web Application Development with MEAN
- 微信公眾平臺開發(fā):從零基礎(chǔ)到ThinkPHP5高性能框架實踐
- Windows Forensics Cookbook
- C#程序設(shè)計
- 利用Python進(jìn)行數(shù)據(jù)分析
- Qt5 C++ GUI Programming Cookbook
- IoT Projects with Bluetooth Low Energy
- Python商務(wù)數(shù)據(jù)分析(微課版)
- Visual Basic程序設(shè)計全程指南
- Maven for Eclipse
- Java編程指南:語法基礎(chǔ)、面向?qū)ο蟆⒑瘮?shù)式編程與項目實戰(zhàn)