PHP Class Icicle\Concurrent\Worker\Internal\PooledWorker

Inheritance: implements Icicle\Concurrent\Worker\Worker
Show file Open project: icicleio/concurrent

Public Methods

Method Description
__construct ( Worker $worker, callable $push )
__destruct ( ) Automatically pushes the worker back into the queue.
enqueue ( Icicle\Concurrent\Worker\Task $task ) : Generator
isIdle ( ) : boolean
isRunning ( ) : boolean
kill ( )
shutdown ( ) : Generator
start ( )

Method Details

__construct() public method

public __construct ( Worker $worker, callable $push )
$worker Icicle\Concurrent\Worker\Worker
$push callable Callable to push the worker back into the queue.

__destruct() public method

Automatically pushes the worker back into the queue.
public __destruct ( )

enqueue() public method

public enqueue ( Icicle\Concurrent\Worker\Task $task ) : Generator
$task Icicle\Concurrent\Worker\Task
return Generator

isIdle() public method

public isIdle ( ) : boolean
return boolean

isRunning() public method

public isRunning ( ) : boolean
return boolean

kill() public method

public kill ( )

shutdown() public method

public shutdown ( ) : Generator
return Generator

start() public method

public start ( )