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 23
static void register(ProcessInterface $process)

Register a server process.

Boot-only. 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 37
static array all()

Get all registered processes.

Return Value

array

at line 45
static bool isRunning()

Determine if the processes are running.

Return Value

bool

at line 57
static void setRunning(bool $running)

Set the running state.

Boot-only. 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 65
static void flushState()

Flush all static state.

Return Value

void