Loai Ghoraba Loai Ghoraba - 1 year ago 71
Python Question

Is python Queue.queue get and put thread safe?


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.

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download