SIGN IN SIGN UP

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.
K
Kyle Stanley committed
2b201369b435a4266bda5b895e3b615dbe28ea6e
Parent: 007bb06
Committed by GitHub <noreply@github.com> on 5/31/2020, 7:07:04 AM