Is python Queue.queue get and put thread safe?
Question:
http://docs.python.org/2/library/queue.html#Queue.Queue.put
It seems a naive question, but I didn’t find the answer on the docs nor with Googling, so are these methods thread safe ? I assume so otherwise there is no point in this queue.
Answers:
See 8.10 Queue — A synchronized queue class (at the top)
The Queue module implements multi-producer, multi-consumer queues. It is especially useful in threaded programming when information must be exchanged safely between multiple threads.
http://docs.python.org/2/library/queue.html#Queue.Queue.put
It seems a naive question, but I didn’t find the answer on the docs nor with Googling, so are these methods thread safe ? I assume so otherwise there is no point in this queue.
See 8.10 Queue — A synchronized queue class (at the top)
The Queue module implements multi-producer, multi-consumer queues. It is especially useful in threaded programming when information must be exchanged safely between multiple threads.