ProcessCollector
class ProcessCollector
Collect coroutine-enabled Swoole processes by name.
Properties
| static protected Process[]> | $processes |
Methods
static void
add(string $name, Process $process)
Add a process to the collector under the given name.
static array
get(string $name)
Get all processes registered under the given name.
static array
all()
Get all collected processes.
static bool
isEmpty()
Determine if the collector is empty.
static void
flushState()
Flush all static state.
Details
at line 27
static void
add(string $name, Process $process)
Add a process to the collector under the given name.
The collector is process-wide static state populated during server boot; runtime use mutates state shared across every coroutine in the worker.
at line 38
static array
get(string $name)
Get all processes registered under the given name.
at line 48
static array
all()
Get all collected processes.
at line 60
static bool
isEmpty()
Determine if the collector is empty.
at line 68
static void
flushState()
Flush all static state.