summaryrefslogtreecommitdiff
path: root/Lib/asyncio/__init__.py
diff options
context:
space:
mode:
authorKyle Stanley <aeros167@gmail.com>2020-05-18 23:03:28 -0400
committerGitHub <noreply@github.com>2020-05-18 20:03:28 -0700
commitcc2bbc2227c3f5ed9d8f6b3bd052e6f9e68279d2 (patch)
tree84839ab8dd6cc9969c3bb7516e20715a8273fb33 /Lib/asyncio/__init__.py
parentd4fe098d1ee4f4056ac65cae55f5ffdd439dede0 (diff)
downloadcpython-git-cc2bbc2227c3f5ed9d8f6b3bd052e6f9e68279d2.tar.gz
bpo-32309: Implement asyncio.to_thread() (GH-20143)
Implements `asyncio.to_thread`, a coroutine for asynchronously running IO-bound functions in a separate thread without blocking the event loop. See the discussion starting from [here](https://github.com/python/cpython/pull/18410#issuecomment-628930973) in GH-18410 for context. Automerge-Triggered-By: @aeros
Diffstat (limited to 'Lib/asyncio/__init__.py')
-rw-r--r--Lib/asyncio/__init__.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/asyncio/__init__.py b/Lib/asyncio/__init__.py
index 28c2e2c429..eb84bfb189 100644
--- a/Lib/asyncio/__init__.py
+++ b/Lib/asyncio/__init__.py
@@ -17,6 +17,7 @@ from .queues import *
from .streams import *
from .subprocess import *
from .tasks import *
+from .threads import *
from .transports import *
# Exposed for _asynciomodule.c to implement now deprecated
@@ -35,6 +36,7 @@ __all__ = (base_events.__all__ +
streams.__all__ +
subprocess.__all__ +
tasks.__all__ +
+ threads.__all__ +
transports.__all__)
if sys.platform == 'win32': # pragma: no cover