Skip to content

Commit

Permalink
bpo-40782: Change asyncio.AbstractEventLoop.run_in_executor to be a m…
Browse files Browse the repository at this point in the history
…ethod not a coroutine (GH-21852)

asyncio.AbstractEventLoop.run_in_executor should be a method that returns an asyncio Future, not an async method.
This matches the concrete implementations, and the documentation better.
  • Loading branch information
jamesba committed Aug 17, 2020
1 parent 99c0ee3 commit 29f8429
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Lib/asyncio/events.py
Expand Up @@ -283,7 +283,7 @@ def create_task(self, coro, *, name=None):
def call_soon_threadsafe(self, callback, *args):
raise NotImplementedError

async def run_in_executor(self, executor, func, *args):
def run_in_executor(self, executor, func, *args):
raise NotImplementedError

def set_default_executor(self, executor):
Expand Down
@@ -0,0 +1 @@
Change the method asyncio.AbstractEventLoop.run_in_executor to not be a coroutine.

0 comments on commit 29f8429

Please sign in to comment.