commit | 2b201369b435a4266bda5b895e3b615dbe28ea6e | [log] [tgz] |
---|---|---|
author | Kyle Stanley <aeros167@gmail.com> | Sun May 31 03:07:04 2020 -0400 |
committer | GitHub <noreply@github.com> | Sun May 31 00:07:04 2020 -0700 |
tree | 75306b15a42274e929b3286f4a74368b983f205c | |
parent | 007bb06a2de9e64fa978f5dd9131d0100227b4cf [diff] |
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.