March 2003
Intermediate to advanced
656 pages
39h 30m
English
Queue
class Queue(maxsize=0)
Queue is the main class for module
Queue and is covered in the next section. When
maxsize is greater than
0, the new Queue instance
q is deemed full when
q has maxsize
items. A thread inserting an item with the
block option, when
q is full, suspends until another thread
extracts an item. When maxsize is less
than or equal to 0, q
is never considered full, and is limited in size only by available
memory, like normal Python containers.