mirror of
https://github.com/python/cpython.git
synced 2025-09-15 05:06:12 +00:00
Fix typo: equivalent code of async with cond
(GH-11681)
This commit is contained in:
parent
2bdd5858e3
commit
d73ac0eba9
1 changed files with 2 additions and 2 deletions
|
@ -180,11 +180,11 @@ Condition
|
||||||
cond = asyncio.Condition()
|
cond = asyncio.Condition()
|
||||||
|
|
||||||
# ... later
|
# ... later
|
||||||
await lock.acquire()
|
await cond.acquire()
|
||||||
try:
|
try:
|
||||||
await cond.wait()
|
await cond.wait()
|
||||||
finally:
|
finally:
|
||||||
lock.release()
|
cond.release()
|
||||||
|
|
||||||
.. coroutinemethod:: acquire()
|
.. coroutinemethod:: acquire()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue