From 9b612dec9545a2b3e9be7cd4f7b7e19625643961 Mon Sep 17 00:00:00 2001 From: BobTheBuidler <70677534+BobTheBuidler@users.noreply.github.com> Date: Sat, 21 Dec 2024 11:25:53 -0400 Subject: [PATCH] feat: AsyncExecutor type var (#505) --- a_sync/executor.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/a_sync/executor.py b/a_sync/executor.py index 45db6831..efd680d9 100644 --- a/a_sync/executor.py +++ b/a_sync/executor.py @@ -313,9 +313,11 @@ def __init__( self.__init_mixin__() +AsyncExecutor = Union[AsyncThreadPoolExecutor, AsyncProcessPoolExecutor] + # For backward-compatibility -ProcessPoolExecutor = AsyncProcessPoolExecutor ThreadPoolExecutor = AsyncThreadPoolExecutor +ProcessPoolExecutor = AsyncProcessPoolExecutor # Pruning thread pool