|
1 | 1 | # Stubs for multiprocessing |
2 | 2 |
|
3 | | -from typing import Any, Callable, Iterable, Mapping, Optional, Dict, List |
| 3 | +from typing import Any, Callable, Iterable, Mapping, Optional, Dict, List, Union |
4 | 4 |
|
| 5 | +from logging import Logger |
5 | 6 | from multiprocessing.context import BaseContext |
6 | 7 | from multiprocessing.managers import SyncManager |
7 | 8 | from multiprocessing.pool import AsyncResult |
8 | 9 | from multiprocessing.process import current_process as current_process |
| 10 | +import sys |
9 | 11 |
|
10 | 12 | class Lock(): |
11 | 13 | def acquire(self, block: bool = ..., timeout: int = ...) -> None: ... |
@@ -101,6 +103,18 @@ class Value(): |
101 | 103 | def __init__(self, typecode_or_type: str, *args: Any, lock: bool = ...) -> None: ... |
102 | 104 |
|
103 | 105 | # ----- multiprocessing function stubs ----- |
| 106 | +def active_children() -> List[Process]: ... |
| 107 | +def allow_connection_pickling() -> None: ... |
104 | 108 | def cpu_count() -> int: ... |
105 | 109 | def freeze_support() -> None: ... |
| 110 | +def get_logger() -> Logger: ... |
| 111 | +def log_to_stderr(level: Optional[Union[str, int]] = ...) -> Logger: ... |
106 | 112 | def Manager() -> SyncManager: ... |
| 113 | +def set_forkserver_preload(module_names: List[str]) -> None: ... |
| 114 | +if sys.platform == 'win32' or sys.version_info >= (3, 4): |
| 115 | + def set_executable(executable: str) -> None: ... |
| 116 | +if sys.version_info >= (3, 4): |
| 117 | + def get_all_start_methods() -> List[str]: ... |
| 118 | + def get_context(method: Optional[str] = ...) -> BaseContext: ... |
| 119 | + def get_start_method(allow_none: Optional[bool]) -> Optional[str]: ... |
| 120 | + def set_start_method(method: str, force: Optional[bool] = ...) -> None: ... |
0 commit comments