diff options
author | Yury Selivanov <yury@magic.io> | 2018-01-28 19:09:40 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-28 19:09:40 (GMT) |
commit | bec2372b7e1da5dfdbadaf242aa8e994b164cace (patch) | |
tree | db2005e235a7e6d82bb49a698eb5b91dd69414c5 /Lib/asyncio | |
parent | a4d00012565d716db6e6abe1b8f33eaaa4de416e (diff) | |
download | cpython-bec2372b7e1da5dfdbadaf242aa8e994b164cace.zip cpython-bec2372b7e1da5dfdbadaf242aa8e994b164cace.tar.gz cpython-bec2372b7e1da5dfdbadaf242aa8e994b164cace.tar.bz2 |
bpo-32327: Revert loop.run_in_executor behaviour: return a Future. (#5392)
I've run some tests on 3.7 asyncio and it appears that too many
things assume that run_in_executor returns a Future.
Diffstat (limited to 'Lib/asyncio')
-rw-r--r-- | Lib/asyncio/base_events.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/asyncio/base_events.py b/Lib/asyncio/base_events.py index 7442bf2..09eb440 100644 --- a/Lib/asyncio/base_events.py +++ b/Lib/asyncio/base_events.py @@ -721,7 +721,7 @@ class BaseEventLoop(events.AbstractEventLoop): self._write_to_self() return handle - async def run_in_executor(self, executor, func, *args): + def run_in_executor(self, executor, func, *args): self._check_closed() if self._debug: self._check_callback(func, 'run_in_executor') @@ -730,7 +730,7 @@ class BaseEventLoop(events.AbstractEventLoop): if executor is None: executor = concurrent.futures.ThreadPoolExecutor() self._default_executor = executor - return await futures.wrap_future( + return futures.wrap_future( executor.submit(func, *args), loop=self) def set_default_executor(self, executor): |