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
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.183.210