Method:ImportQueueq= Queue. Queue (maxsize=0)#constructs an advanced presentation queue, maxsize specifies the queue length, which is 0 o'clock, which indicates that the queue length is unlimited. Q.join ()#when the queue is Kong, perform other operationsQ.qsize ()#returns the size of the queue (unreliable)Q.empty ()#returns True if the queue is empty, otherwise false (unreliable)Q.full ()#returns True when the queue is full, otherwise false (unreliable)Q.put (item, block=true, Timeout=none)#put item in the queue tail, item must exist, can parameter block default is True, indicating that when the queue is full, waiting for the queue to give the available location,is non-blocking when false, and a queue is raised if it is full at this time. Full exception. Optional parameter timeout, which indicates the time at which the setting is blocked, and, after that, if the queue cannot give the location to which it was placed, it raises the queue. Full exception Q.get (Block=true, Timeout=none)#Remove and return a value for the header of the queue, optional parameter block defaults to True, indicating that when the value is fetched, if the queue is empty, it is blocked, false, not blocked,if the queue is empty at this point, queue is raised. Empty exception. Optional parameter timeout, which indicates that the setting is blocked, and then, if the queue is empty, throws an empty exception. Q.put_nowait (item)#equivalent to put (Item,block=false)Q.get_nowait ()#equivalent to get (item,block=false)