# PContext Source: https://www.tensorplay.cn/docs/generated/tensorplay.distributed.elastic.multiprocessing.PContext.html ```python class tensorplay.distributed.elastic.multiprocessing.PContext(name: str, entrypoint: ~collections.abc.Callable | str, args: tuple, envs: dict[int, dict[str, str]], logs_specs: ~tensorplay.distributed.elastic.multiprocessing.api.LogsSpecs | None = None, log_dir: str | None = None, redirects: ~tensorplay.distributed.elastic.multiprocessing.redirects.Std | dict[int, ~tensorplay.distributed.elastic.multiprocessing.redirects.Std] = , tee: ~tensorplay.distributed.elastic.multiprocessing.redirects.Std | dict[int, ~tensorplay.distributed.elastic.multiprocessing.redirects.Std] = , log_line_prefixes: dict[int, str] | None = None, duplicate_stdout_filters: list[str] | None = None, duplicate_stderr_filters: list[str] | None = None) ``` Base class owning a homogeneous group of worker processes. ```python close(death_sig: Signals | None = None, timeout: int = 30) → None ``` Terminate all workers with death_sig, escalating to kill. ```python poll() → RunProcsResult | None ``` Return the terminal result, or None while workers are running. ```python start() → None ``` Launch all workers. ```python wait(timeout: float = -1, period: float = 1) → RunProcsResult | None ``` Block until completion (or timeout seconds); returns the result.