What is difference between multiprocessing.Event
and multiprocessing.managers.SyncManager.Event
. When do I use each? Why two different objects exist?
Same question for other similar objects existing in multiprocessing
directly and also in Manager
(Lock
, etc.)
Unfortunately, the only given answer is not very correct and others wasn't given.
I looked it up my own, and found that multiprocessing.Event
can be used to synch between processes, it's completely alright.
Event
and other objects from multiprocessing.Manager
exist to be able to synchronize things between processes that runs on different machines via sockets under the hood. They also can be used synchronize on single machine, but less efficient for this than just using synch objects from multiprocessing.synchronize
(like Event
and Lock
and others)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With