This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mhchia
Recipients docs@python, mhchia
Date 2019-01-25.10:45:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1548413114.61.0.24849994852.issue35826@roundup.psfhosted.org>
In-reply-to
Content
In the [example](https://docs.python.org/3.8/library/asyncio-sync.html#asyncio.Condition) of the equivalent code to the `async with` statement:
```python
cond = asyncio.Condition()

# ... later
await lock.acquire()
try:
    await cond.wait()
finally:
    lock.release()
```

`lock.acquire()` should be replaced by `cond.acquire()`, and `lock.release()` replaced by `cond.release()`. So the resulting code snippet becomes:

```python
cond = asyncio.Condition()

# ... later
await cond.acquire()
try:
    await cond.wait()
finally:
    cond.release()
```
History
Date User Action Args
2019-01-25 10:45:15mhchiasetrecipients: + mhchia, docs@python
2019-01-25 10:45:14mhchiasetmessageid: <1548413114.61.0.24849994852.issue35826@roundup.psfhosted.org>
2019-01-25 10:45:14mhchialinkissue35826 messages
2019-01-25 10:45:14mhchiacreate