From 12dd8d9718cb76fff1fce98168773982cfcfec45 Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Fri, 22 Oct 2021 13:50:42 -0400 Subject: [PATCH] AbstractEventLoop.run_in_executor() returns Future (#6187) https://docs.python.org/3.10/library/asyncio-eventloop.html#asyncio.loop.run_in_executor > This method returns a asyncio.Future object. --- stdlib/asyncio/events.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/asyncio/events.pyi b/stdlib/asyncio/events.pyi index 1096176cf..6ef9117b6 100644 --- a/stdlib/asyncio/events.pyi +++ b/stdlib/asyncio/events.pyi @@ -113,7 +113,7 @@ class AbstractEventLoop(metaclass=ABCMeta): @abstractmethod def call_soon_threadsafe(self, callback: Callable[..., Any], *args: Any) -> Handle: ... @abstractmethod - def run_in_executor(self, executor: Any, func: Callable[..., _T], *args: Any) -> Awaitable[_T]: ... + def run_in_executor(self, executor: Any, func: Callable[..., _T], *args: Any) -> Future[_T]: ... @abstractmethod def set_default_executor(self, executor: Any) -> None: ... # Network I/O methods returning Futures.