mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
46 lines
1.3 KiB
Python
46 lines
1.3 KiB
Python
import sys
|
|
from collections.abc import Callable, Iterable, Mapping
|
|
from typing import Any
|
|
|
|
if sys.version_info >= (3, 8):
|
|
__all__ = ["BaseProcess", "current_process", "active_children", "parent_process"]
|
|
else:
|
|
__all__ = ["BaseProcess", "current_process", "active_children"]
|
|
|
|
class BaseProcess:
|
|
name: str
|
|
daemon: bool
|
|
authkey: bytes
|
|
_identity: tuple[int, ...] # undocumented
|
|
def __init__(
|
|
self,
|
|
group: None = None,
|
|
target: Callable[..., object] | None = None,
|
|
name: str | None = None,
|
|
args: Iterable[Any] = (),
|
|
kwargs: Mapping[str, Any] = {},
|
|
*,
|
|
daemon: bool | None = None,
|
|
) -> None: ...
|
|
def run(self) -> None: ...
|
|
def start(self) -> None: ...
|
|
def terminate(self) -> None: ...
|
|
def kill(self) -> None: ...
|
|
def close(self) -> None: ...
|
|
def join(self, timeout: float | None = None) -> None: ...
|
|
def is_alive(self) -> bool: ...
|
|
@property
|
|
def exitcode(self) -> int | None: ...
|
|
@property
|
|
def ident(self) -> int | None: ...
|
|
@property
|
|
def pid(self) -> int | None: ...
|
|
@property
|
|
def sentinel(self) -> int: ...
|
|
|
|
def current_process() -> BaseProcess: ...
|
|
def active_children() -> list[BaseProcess]: ...
|
|
|
|
if sys.version_info >= (3, 8):
|
|
def parent_process() -> BaseProcess | None: ...
|