diff --git a/stdlib/3/multiprocessing/pool.pyi b/stdlib/3/multiprocessing/pool.pyi index 2f3075aeb..32fe4f7aa 100644 --- a/stdlib/3/multiprocessing/pool.pyi +++ b/stdlib/3/multiprocessing/pool.pyi @@ -2,5 +2,35 @@ # NOTE: These are incomplete! +from typing import Any, Callable, Iterable, List, Sequence + +class AsyncResult(): + def get(self, timeout: float = -1) -> Any: ... + def wait(self, timeout: float = -1) -> None: ... + def ready(self) -> bool: ... + def successful(self) -> bool: ... + class ThreadPool(): def __init__(self, processes: int = ...) -> None: ... + def apply_async(self, func: Callable[..., Any], + args: Sequence[Any]=(), + kwds: Dict[str, Any]={}, + callback: Callable[..., None] = None) -> AsyncResult: ... + def apply(self, func: Callable[..., Any], + args: Sequence[Any]=(), + kwds: Dict[str, Any]={}) -> Any: ... + def map(self, func: Callable[..., Any], + iterable: Iterable[Any]=()) -> List[Any]: ... + def map_async(self, func: Callable[..., Any], + iterable: Iterable[Any] = (), + chunksize: int = -1, + callback: Callable[..., None] = None) -> AsyncResult: ... + def imap(self, func: Callable[..., Any], + iterable: Iterable[Any]=()) -> Iterable[Any]: ... + def imap_async(self, func: Callable[..., Any], + chunksize: int = -1, + iterable: Iterable[Any]=(), + callback: Callable[..., None] = None) -> AsyncResult: ... + def close(self) -> None: ... + def terminate(self) -> None: ... + def join(self) -> None: ...