diff options
author | Duprat <yduprat@gmail.com> | 2025-04-17 11:41:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-17 11:41:30 +0200 |
commit | 15c75d7a8b86d9f76982f70a00b69b403458694f (patch) | |
tree | ded8e18712434fc0540539a0a2736d0ae15cfe8b /Lib/multiprocessing/synchronize.py | |
parent | 0c356c865a6d3806724f54d6d463b2e5289f6afa (diff) | |
download | cpython-15c75d7a8b86d9f76982f70a00b69b403458694f.tar.gz cpython-15c75d7a8b86d9f76982f70a00b69b403458694f.zip |
gh-132561: Fix the public `multiprocessing.SemLock.locked` method (#132586)
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Diffstat (limited to 'Lib/multiprocessing/synchronize.py')
-rw-r--r-- | Lib/multiprocessing/synchronize.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/multiprocessing/synchronize.py b/Lib/multiprocessing/synchronize.py index 771f1db8813..30425047e98 100644 --- a/Lib/multiprocessing/synchronize.py +++ b/Lib/multiprocessing/synchronize.py @@ -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__() |