-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Closed
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-multiprocessingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
According to the documentation, both multiprocessing.Manager.Lock and RLock should be the equivalent of an threading.Lock and RLock, but the underlying AcquirerProxy is missing the implementation of the .locked()
method to query the state of the lock.
E.g.
from multiprocessing import Manager
from threading import Lock
if __name__ == "__main__":
lock_th = Lock()
lock_th.locked() # this one works
with Manager() as manager:
lock_man = manager.Lock()
lock_man.locked() # this throws an "AttributeError: 'AcquirerProxy' object has no attribute 'locked'"
CPython versions tested on:
3.11, 3.12
Operating systems tested on:
Linux, macOS
Linked PRs
Metadata
Metadata
Assignees
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-multiprocessingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error