]> granicus.if.org Git - python/commitdiff
Fix typo: equivalent code of `async with cond` (GH-11681)
authorKevin Mai-Husan Chia <mhchia@users.noreply.github.com>
Thu, 14 Feb 2019 02:39:25 +0000 (10:39 +0800)
committerLisa Roach <lisaroach14@gmail.com>
Thu, 14 Feb 2019 02:39:25 +0000 (18:39 -0800)
Doc/library/asyncio-sync.rst

index 18b5629704366d86e0412bc87e56f20f9efcf04c..18da18873dbfb5577888944b7eacf84854553cb5 100644 (file)
@@ -180,11 +180,11 @@ Condition
        cond = asyncio.Condition()
 
        # ... later
-       await lock.acquire()
+       await cond.acquire()
        try:
            await cond.wait()
        finally:
-           lock.release()
+           cond.release()
 
    .. coroutinemethod:: acquire()