Skip to content
This repository was archived by the owner on Nov 23, 2017. It is now read-only.

Commit b8b0fa0

Browse files
committed
Drop run_in_executor
1 parent fa721ee commit b8b0fa0

File tree

1 file changed

+1
-22
lines changed

1 file changed

+1
-22
lines changed

asyncio/base_events.py

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
from .log import logger
3939

4040

41-
__all__ = ['BaseEventLoop', 'run_in_executor']
41+
__all__ = ['BaseEventLoop']
4242

4343

4444
# Minimum number of _scheduled timer handles before cleanup of
@@ -55,27 +55,6 @@
5555
ConnectionResetError, ConnectionAbortedError)
5656

5757

58-
@coroutine
59-
def run_in_executor(executor, func, *args):
60-
"""Run the function in a thread or a process pool.
61-
62-
Any concurrent.futures executor can be passed to the
63-
function.
64-
65-
If executor is None, the function will be run in
66-
the default threadpool of the event loop.
67-
68-
Example:
69-
70-
async def coro():
71-
await asyncio.run_in_executor(
72-
None, long_calculation, 42)
73-
"""
74-
loop = events.get_event_loop()
75-
result = yield from loop.run_in_executor(executor, func, *args)
76-
return result
77-
78-
7958
def _format_handle(handle):
8059
cb = handle._callback
8160
if inspect.ismethod(cb) and isinstance(cb.__self__, tasks.Task):

0 commit comments

Comments
 (0)