diff --git a/stdlib/3/multiprocessing/__init__.pyi b/stdlib/3/multiprocessing/__init__.pyi index f3b5bb36b..ff78662cc 100644 --- a/stdlib/3/multiprocessing/__init__.pyi +++ b/stdlib/3/multiprocessing/__init__.pyi @@ -1,15 +1,41 @@ # Stubs for multiprocessing -from typing import Any +from typing import Any, Callable, Iterable, Mapping -class Lock(): ... -class Process(): ... +class Lock(): + def acquire(self, block: bool = ..., timeout: int = ...) -> None: ... + def release(self) -> None: ... + +class Process(): + # TODO: set type of group to None + def __init__(self, + group: Any = ..., + target: Callable = ..., + name: str = ..., + args: Iterable[Any] = ..., + kwargs: Mapping[Any, Any] = ..., + daemon: bool = ...) -> None: ... + def start(self) -> None: ... + def run(self) -> None: ... + def terminate(self) -> None: ... + def is_alive(self) -> bool: ... + def join(self, timeout: float = ...) -> None: ... class Queue(): - def get(block: bool = ..., timeout: float = ...) -> Any: ... + def __init__(self, maxsize: int = ...) -> None: ... + def get(self, block: bool = ..., timeout: float = ...) -> Any: ... + def put(self, item: Any, block: bool = ..., timeout: float = ...) -> None: ... + def qsize(self) -> int: ... + def empty(self) -> bool: ... + def full(self) -> bool: ... + def put_nowait(self, item: Any) -> None: ... + def get_nowait(self) -> Any: ... + def close(self) -> None: ... + def join_thread(self) -> None: ... + def cancel_join_thread(self) -> None: ... class Value(): - def __init__(typecode_or_type: str, *args: Any, lock: bool = ...) -> None: ... + def __init__(self, typecode_or_type: str, *args: Any, lock: bool = ...) -> None: ... # ----- multiprocessing function stubs ----- def cpu_count() -> int: ...