Managed objects are always proxies; The managerβs goal is to make objects that do not support multiprocessing aware of multiprocessing.
It makes no sense to do this for multiprocessing.Lock()
objects; they are implemented using semaphores and fully support multiprocessing without help.
threading.Lock
, on the other hand, is not knowledgeable about multiprocessing; there are some differences between threading.Lock()
and multiprocessing.Lock()
; the latter supports a timeout when buying a lock, for example.
source share