Update ProcessPoolExecutor for 3.14 (#13994)

This commit is contained in:
Max Muoto
2025-05-10 15:43:14 -05:00
committed by GitHub
parent bd2e68f628
commit 33a0cb977e
3 changed files with 18 additions and 11 deletions
+14 -3
View File
@@ -54,9 +54,20 @@ class Future(Generic[_T]):
class Executor:
def submit(self, fn: Callable[_P, _T], /, *args: _P.args, **kwargs: _P.kwargs) -> Future[_T]: ...
def map(
self, fn: Callable[..., _T], *iterables: Iterable[Any], timeout: float | None = None, chunksize: int = 1
) -> Iterator[_T]: ...
if sys.version_info >= (3, 14):
def map(
self,
fn: Callable[..., _T],
*iterables: Iterable[Any],
timeout: float | None = None,
chunksize: int = 1,
buffersize: int | None = None,
) -> Iterator[_T]: ...
else:
def map(
self, fn: Callable[..., _T], *iterables: Iterable[Any], timeout: float | None = None, chunksize: int = 1
) -> Iterator[_T]: ...
def shutdown(self, wait: bool = True, *, cancel_futures: bool = False) -> None: ...
def __enter__(self) -> Self: ...
def __exit__(
+4
View File
@@ -236,3 +236,7 @@ class ProcessPoolExecutor(Executor):
def _start_executor_manager_thread(self) -> None: ...
def _adjust_process_count(self) -> None: ...
if sys.version_info >= (3, 14):
def kill_workers(self) -> None: ...
def terminate_workers(self) -> None: ...