This is automatic generated document for things in Swow\Process\WorkerContext class

Class WorkerContext

Worker 进程的上下文信息

传递给 Worker callback,包含 Worker 标识和进程拓扑信息

Methods

Method __construct

public function __construct ( int $id , int $pid , int $managerPid , int $workerCount )

Method getId

public function getId ( ) : int

Worker 编号 (0-based)

Method getManagerPid

public function getManagerPid ( ) : int

Manager 进程 PID

Method getPid

public function getPid ( ) : int

当前 Worker 进程 PID

Method getWorkerCount

public function getWorkerCount ( ) : int

总 Worker 数量


Copyright 2022 the Swow contributors