mirror of
https://github.com/python/cpython.git
synced 2025-09-11 19:27:07 +00:00
gh-132561: Fix the public multiprocessing.SemLock.locked
method (#132586)
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
This commit is contained in:
parent
0c356c865a
commit
15c75d7a8b
3 changed files with 40 additions and 1 deletions
|
@ -91,7 +91,7 @@ class SemLock(object):
|
|||
self.release = self._semlock.release
|
||||
|
||||
def locked(self):
|
||||
return self._semlock._count() != 0
|
||||
return self._semlock._is_zero()
|
||||
|
||||
def __enter__(self):
|
||||
return self._semlock.__enter__()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue