PHP Class Icicle\Concurrent\Worker\Worker

Inheritance: implements Icicle\Concurrent\Worker\WorkerInterface
Afficher le fichier Open project: icicleio/concurrent Class Usage Examples

Méthodes publiques

Méthode Description
enqueue ( Icicle\Concurrent\Worker\Task $task ) : Generator
isIdle ( ) : boolean Checks if the worker is currently idle.
isRunning ( ) : boolean Checks if the worker is running.
kill ( ) Immediately kills the context.
shutdown ( ) : Generator
start ( ) Starts the context execution.

Method Details

enqueue() public méthode

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

isIdle() public méthode

Checks if the worker is currently idle.
public isIdle ( ) : boolean
Résultat boolean

isRunning() public méthode

Checks if the worker is running.
public isRunning ( ) : boolean
Résultat boolean True if the worker is running, otherwise false.

kill() public méthode

Immediately kills the context.
public kill ( )

shutdown() public méthode

public shutdown ( ) : Generator
Résultat Generator

start() public méthode

Starts the context execution.
public start ( )