diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2020-05-31 07:26:20 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-31 07:26:20 (GMT) |
commit | cdb015b7ed58ee2babf552001374c278219854e1 (patch) | |
tree | f5e66d38ece32f20f46633355f0a4d0aa9b6f72f /Python/pythonrun.c | |
parent | 44400e88f906bf99cd2c57791f1201c400daf6af (diff) | |
download | cpython-cdb015b7ed58ee2babf552001374c278219854e1.zip cpython-cdb015b7ed58ee2babf552001374c278219854e1.tar.gz cpython-cdb015b7ed58ee2babf552001374c278219854e1.tar.bz2 |
Fix asyncio.to_thread() documented return type (GH-20547)
When I wrote the documentation for `asyncio.to_thread()`, I mistakenly assumed that `return await loop.run_in_executor(...)` within an async def function would return a Future. In reality, it returns a coroutine.
This likely won't affect typical usage of `asyncio.to_thread()`, but it's important for the documentation to be correct here. In general, we also tend to avoid returning futures from high-level APIs in asyncio.
(cherry picked from commit 2b201369b435a4266bda5b895e3b615dbe28ea6e)
Co-authored-by: Kyle Stanley <aeros167@gmail.com>
Diffstat (limited to 'Python/pythonrun.c')
0 files changed, 0 insertions, 0 deletions