q.get() # 在队列为空时会阻塞 q.put() # 在队列满时会阻塞 get_nowait() # 在队列为空的时候也不阻塞,这时候会抛异常queue.Empty put_nowait(1) # 在队列满的时候也不阻塞,这时候会抛异常queue.Full