WorkerPoolApp
in package
implements
WorkerStartHandler
AbstractYes
Tags
Table of Contents
Interfaces
Methods
- onWorkerStart() : void
- run() : void
- Boot the worker pool. Blocks until the pool exits.
- configure() : void
- Spawn actors and configure this worker. Called once per thread after the WorkerNode is ready. Safe to use closures and object instantiation.
Methods
onWorkerStart()
public
final onWorkerStart(WorkerNode $node) : void
Parameters
- $node : WorkerNode
run()
Boot the worker pool. Blocks until the pool exits.
public
final static run(WorkerPoolConfig $config) : void
Passes static::class (a string) to the bootstrap so no closures cross thread boundaries. Each thread instantiates the subclass fresh.
Parameters
- $config : WorkerPoolConfig
configure()
Spawn actors and configure this worker. Called once per thread after the WorkerNode is ready. Safe to use closures and object instantiation.
protected
abstract configure(WorkerNode $node) : void
Parameters
- $node : WorkerNode