Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
Bug report
Bug description:
According to the documentation, bothmultiprocessing.Manager.Lock andRLock should be the equivalent of anthreading.Lock andRLock, but the underlyingAcquirerProxy is missing the implementation of the.locked() method to query the state of the lock.
E.g.
frommultiprocessingimportManagerfromthreadingimportLockif__name__=="__main__":lock_th=Lock()lock_th.locked()# this one workswithManager()asmanager: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