replace gen.coroutine usage with `async def`
Open
asyncio
hygiene
- Dominant language
- Python
- Stars
- 1.7k
- Forks
- 778
- Avg merge
- 2h 50m
- Merged PRs (30d)
- 3
Description
most functions that use `@gen.coroutine` were upgraded in #3706 #3242 #2934 and #2871 however there's still a few left
notably
https://github.com/dask/distributed/blob/f4c52e9a6b407fda875a733f20fd43d956f252d3/distributed/comm/tcp.py#L330-L334
this `Task was destroyed but it is pending!` warning message is due to `loop.stop()` being called before all the tasks are finished. When using `asyncio.run` all tasks are cancelled and the loop only stops when all the tasks are finished and so this error should no longer happen.
see also https://github.com/dask/distributed/pull/3245
Soft blocked by: Usage of asyncio.run
Contributor guide
Assessment
This issue has not been assessed yet.