mirror of
https://github.com/python/cpython.git
synced 2025-12-11 03:20:01 +00:00
bpo-40782: Change asyncio.AbstractEventLoop.run_in_executor to be a method 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.
This commit is contained in:
parent
99c0ee3c89
commit
29f84294d8
2 changed files with 2 additions and 1 deletions
|
|
@ -283,7 +283,7 @@ class AbstractEventLoop:
|
||||||
def call_soon_threadsafe(self, callback, *args):
|
def call_soon_threadsafe(self, callback, *args):
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
async def run_in_executor(self, executor, func, *args):
|
def run_in_executor(self, executor, func, *args):
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
def set_default_executor(self, executor):
|
def set_default_executor(self, executor):
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
Change the method asyncio.AbstractEventLoop.run_in_executor to not be a coroutine.
|
||||||
Loading…
Add table
Add a link
Reference in a new issue