Method |
Description |
|
__construct ( integer $minSize = null, integer $maxSize = null, Icicle\Concurrent\Worker\WorkerFactory $factory = null ) |
Creates a new worker pool. |
|
enqueue ( Icicle\Concurrent\Worker\Task $task ) : Generator |
Enqueues a task to be executed by the worker pool. |
|
get ( ) : Worker |
|
|
getIdleWorkerCount ( ) : integer |
|
|
getMaxSize ( ) : integer |
|
|
getMinSize ( ) : integer |
|
|
getWorkerCount ( ) : integer |
|
|
isIdle ( ) : boolean |
Checks if the pool has any idle workers. |
|
isRunning ( ) : boolean |
Checks if the pool is running. |
|
kill ( ) |
Kills all workers in the pool and halts the worker pool. |
|
shutdown ( ) : Generator |
Shuts down the pool and all workers in it. |
|
start ( ) |
Starts the worker pool execution. |
|