PHP Class Icicle\Concurrent\Worker\Worker

Inheritance: implements Icicle\Concurrent\Worker\WorkerInterface
Exibir arquivo Open project: icicleio/concurrent Class Usage Examples

Public Methods

Method 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 method

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

isIdle() public method

Checks if the worker is currently idle.
public isIdle ( ) : boolean
return boolean

isRunning() public method

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

kill() public method

Immediately kills the context.
public kill ( )

shutdown() public method

public shutdown ( ) : Generator
return Generator

start() public method

Starts the context execution.
public start ( )