Reputation: 1370
I have a program which uses both, threads and processes. To share a data between them, I currently use a multiprocessing.Queue
. Is this queue implementation thread safe?
Upvotes: 10
Views: 11094
Reputation: 1370
Yes, it is. From https://docs.python.org/3/library/multiprocessing.html#exchanging-objects-between-processes:
Queues are thread and process safe.
Upvotes: 14