ID EN
Multiprocessing

Lock

Python 3.11

A non-recursive lock object: a close analog of threading.Lock. Once a process or thread has acquired a lock, subsequent attempts to acquire it from any process or thread will block until it is released; any process or thread may release it. The concepts and behaviors of threading.Lock as it applies to threads are replicated here in multiprocessing.Lock as it applies to either processes or threads, except as noted.

Syntax

PYTHON
class multiprocessing.Lock

See Also

threading.Lock threading.Lock multiprocessing.Lock Lock Lock context manager with threading.Lock.acquire()