mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
[3.14] gh-133146: Add the old public get_value method to documentation and refactor code. (GH-133301) (#142110)
also uses it within the internals in a few places.
(cherry picked from commit db098a475a)
Co-authored-by: Duprat <yduprat@gmail.com>
This commit is contained in:
parent
3824ad0286
commit
b95d16a338
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