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.
This commit is contained in:
Yury Selivanov 2018-01-28 14:09:40 -05:00 committed by GitHub
parent a4d0001256
commit bec2372b7e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 12 deletions

View file

@ -2999,9 +2999,8 @@ class RunCoroutineThreadsafeTests(test_utils.TestCase):
def task_factory(loop, coro):
raise NameError
run = self.loop.create_task(
self.loop.run_in_executor(
None, lambda: self.target(advance_coro=True)))
run = self.loop.run_in_executor(
None, lambda: self.target(advance_coro=True))
# Set exception handler
callback = test_utils.MockCallback()