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?
Asked
Active
Viewed 9,218 times
9

tomasbedrich
- 1,350
- 18
- 26
1 Answers
13
Yes, it is. From https://docs.python.org/3/library/multiprocessing.html#exchanging-objects-between-processes:
Queues are thread and process safe.

tomasbedrich
- 1,350
- 18
- 26