]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix typo: equivalent code of `async with cond` (GH-11681) (GH-16720)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 11 Oct 2019 17:27:16 +0000 (10:27 -0700)
committerNed Deily <nad@python.org>
Mon, 14 Oct 2019 21:22:18 +0000 (17:22 -0400)
Doc/library/asyncio-sync.rst

index 993bd13fb0301366139ecb272d929e331579d75f..79f6b02d85e2e535a411f908ee6d6f8bf965b28c 100644 (file)
@@ -187,11 +187,11 @@ Condition
        cond = asyncio.Condition()
 
        # ... later
-       await lock.acquire()
+       await cond.acquire()
        try:
            await cond.wait()
        finally:
-           lock.release()
+           cond.release()
 
    .. coroutinemethod:: acquire()