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.

Asked By: user1011792

||

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.

Answered By: Pavel Anossov
Categories: questions Tags:
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.