mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
Use true booleans.
This commit is contained in:
parent
4fad4dac30
commit
7b1c41417f
1 changed files with 2 additions and 2 deletions
|
|
@ -97,7 +97,7 @@ class _RLock(_Verbose):
|
|||
owner and owner.name,
|
||||
self._count)
|
||||
|
||||
def acquire(self, blocking=1):
|
||||
def acquire(self, blocking=True):
|
||||
me = current_thread()
|
||||
if self._owner is me:
|
||||
self._count = self._count + 1
|
||||
|
|
@ -289,7 +289,7 @@ class _Semaphore(_Verbose):
|
|||
self._cond = Condition(Lock())
|
||||
self._value = value
|
||||
|
||||
def acquire(self, blocking=1):
|
||||
def acquire(self, blocking=True):
|
||||
rc = False
|
||||
self._cond.acquire()
|
||||
while self._value == 0:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue