PHP Class Icicle\Concurrent\Worker\Internal\PooledWorker

Inheritance: implements Icicle\Concurrent\Worker\Worker
Afficher le fichier Open project: icicleio/concurrent

Méthodes publiques

Méthode 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 méthode

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

__destruct() public méthode

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

enqueue() public méthode

public enqueue ( Icicle\Concurrent\Worker\Task $task ) : Generator
$task Icicle\Concurrent\Worker\Task
Résultat Generator

isIdle() public méthode

public isIdle ( ) : boolean
Résultat boolean

isRunning() public méthode

public isRunning ( ) : boolean
Résultat boolean

kill() public méthode

public kill ( )

shutdown() public méthode

public shutdown ( ) : Generator
Résultat Generator

start() public méthode

public start ( )