diff options
| author | Nadir Chowdhury <[email protected]> | 2021-04-06 01:31:03 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-04-05 20:31:03 -0400 |
| commit | 2ff24a27b593b6b562d61e16e45b525ad8a0276a (patch) | |
| tree | 73be18e29bce411a14afe2c1ebfcaca456d3f93c /discord/utils.py | |
| parent | Remove fail-safe for retrieving all tasks (diff) | |
| download | discord.py-2ff24a27b593b6b562d61e16e45b525ad8a0276a.tar.xz discord.py-2ff24a27b593b6b562d61e16e45b525ad8a0276a.zip | |
Use `asyncio.create_task` over `asyncio.ensure_future`
Diffstat (limited to 'discord/utils.py')
| -rw-r--r-- | discord/utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/discord/utils.py b/discord/utils.py index 03478b3f..fec7b5c0 100644 --- a/discord/utils.py +++ b/discord/utils.py @@ -369,7 +369,7 @@ async def async_all(gen, *, check=_isawaitable): async def sane_wait_for(futures, *, timeout): ensured = [ - asyncio.ensure_future(fut) for fut in futures + asyncio.create_task(fut) for fut in futures ] done, pending = await asyncio.wait(ensured, timeout=timeout, return_when=asyncio.ALL_COMPLETED) |