Staging
v0.5.1
https://github.com/python/cpython
Revision cdb015b7ed58ee2babf552001374c278219854e1 authored by Miss Islington (bot) on 31 May 2020, 07:26:20 UTC, committed by GitHub on 31 May 2020, 07:26:20 UTC

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>
1 parent 44400e8
History
Tip revision: cdb015b7ed58ee2babf552001374c278219854e1 authored by Miss Islington (bot) on 31 May 2020, 07:26:20 UTC
Fix asyncio.to_thread() documented return type (GH-20547)
Tip revision: cdb015b
File Mode Size
.azure-pipelines
.github
Doc
Grammar
Include
Lib
Mac
Misc
Modules
Objects
PC
PCbuild
Parser
Programs
Python
Tools
m4
.gitattributes -rw-r--r-- 1.8 KB
.gitignore -rw-r--r-- 1.8 KB
.travis.yml -rw-r--r-- 8.3 KB
CODE_OF_CONDUCT.md -rw-r--r-- 630 bytes
LICENSE -rw-r--r-- 12.5 KB
Makefile.pre.in -rw-r--r-- 68.5 KB
README.rst -rw-r--r-- 9.9 KB
aclocal.m4 -rw-r--r-- 13.1 KB
config.guess -rwxr-xr-x 43.1 KB
config.sub -rwxr-xr-x 35.4 KB
configure -rwxr-xr-x 499.1 KB
configure.ac -rw-r--r-- 168.3 KB
install-sh -rwxr-xr-x 15.0 KB
netlify.toml -rw-r--r-- 82 bytes
pyconfig.h.in -rw-r--r-- 44.4 KB
setup.py -rw-r--r-- 108.5 KB

README.rst

back to top