mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
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:
parent
f2ca1581ca
commit
db098a475a
3 changed files with 20 additions and 5 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue