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 26
static void
add(string $name, Process $process)
Add a process to the collector under the given name.
Boot-only. The collector is process-wide static state populated during server boot; runtime use mutates state shared across every coroutine in the worker.
at line 36
static array
get(string $name)
Get all processes registered under the given name.
at line 46
static array
all()
Get all collected processes.
at line 58
static bool
isEmpty()
Determine if the collector is empty.
at line 66
static void
flushState()
Flush all static state.