Skip to content

Commit 29f8429

Browse files
authored
bpo-40782: Change asyncio.AbstractEventLoop.run_in_executor to be a method not a coroutine (pythonGH-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.
1 parent 99c0ee3 commit 29f8429

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Lib/asyncio/events.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ def create_task(self, coro, *, name=None):
283283
def call_soon_threadsafe(self, callback, *args):
284284
raise NotImplementedError
285285

286-
async def run_in_executor(self, executor, func, *args):
286+
def run_in_executor(self, executor, func, *args):
287287
raise NotImplementedError
288288

289289
def set_default_executor(self, executor):
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Change the method asyncio.AbstractEventLoop.run_in_executor to not be a coroutine.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy