9

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?

tomasbedrich
  • 1,350
  • 18
  • 26

1 Answers1

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