gh-133146: Add the old public get_value method to documentation and refactor code. (GH-133301)

also uses it within the internals in a few places.
This commit is contained in:
Duprat 2025-11-29 23:12:48 +01:00 committed by GitHub
parent f2ca1581ca
commit db098a475a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 20 additions and 5 deletions

View file

@ -121,7 +121,7 @@ def get(self, block=True, timeout=None):
def qsize(self):
# Raises NotImplementedError on Mac OSX because of broken sem_getvalue()
return self._maxsize - self._sem._semlock._get_value()
return self._maxsize - self._sem.get_value()
def empty(self):
return not self._poll()