gh-132561: Fix the public multiprocessing.SemLock.locked method (#132586)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
This commit is contained in:
Duprat 2025-04-17 11:41:30 +02:00 committed by GitHub
parent 0c356c865a
commit 15c75d7a8b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 40 additions and 1 deletions

View file

@ -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__()