class ProcessManager

Properties

static protected ProcessInterface> $processes
static protected bool $running

Methods

static void
register(ProcessInterface $process)

Register a server process.

static array
all()

Get all registered processes.

static bool
isRunning()

Determine if the processes are running.

static void
setRunning(bool $running)

Set the running state.

static void
flushState()

Flush all static state.

Details

at line 24
static void register(ProcessInterface $process)

Register a server process.

Process registrations persist in static state and must be completed before the server process manager starts running.

Parameters

ProcessInterface $process

Return Value

void

at line 39
static array all()

Get all registered processes.

Return Value

array

at line 47
static bool isRunning()

Determine if the processes are running.

Return Value

bool

at line 59
static void setRunning(bool $running)

Set the running state.

Part of the server lifecycle; also called by the SIGTERM handler at shutdown. Mutates worker-lifetime static state; per-request use races across coroutines and disables the register() guard.

Parameters

bool $running

Return Value

void

at line 67
static void flushState()

Flush all static state.

Return Value

void