Message334350
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()
``` |
|
Date |
User |
Action |
Args |
2019-01-25 10:45:15 | mhchia | set | recipients:
+ mhchia, docs@python |
2019-01-25 10:45:14 | mhchia | set | messageid: <1548413114.61.0.24849994852.issue35826@roundup.psfhosted.org> |
2019-01-25 10:45:14 | mhchia | link | issue35826 messages |
2019-01-25 10:45:14 | mhchia | create | |
|