Worker::unstack

(PECL pthreads >= 2.0.0) Stacking public integer Worker::unstack ([ Threaded &$work ] ) Removes the referenced object ( or all objects if parameters are void ) from stack of the referenced Worker Parameters: work Threaded object previously stacked onto Worker Returns: The new length of the stack

Worker::stack

(PECL pthreads >= 2.0.0) Stacking public integer Worker::stack ( Threaded &$work ) Appends the referenced object to the stack of the referenced Worker Parameters: work Threaded object to be executed by the referenced Worker Returns: The new length of the stack Examples: Stackin

Worker::shutdown

(PECL pthreads >= 2.0.0) Synchronization public boolean Worker::shutdown ( void ) Shuts down the Worker after executing all the objects previously stacked Returns: Examples: Shutdown the referenced Worker <?php $my = new Worker(); $my->start(); /* ... */ var_dump($my->shutdown()); /* ... */ ?> The above ex

Worker::isWorking

(PECL pthreads >= 2.0.0) State Detection public boolean Worker::isWorking ( void ) Tell if a Worker is executing Stackables Returns: A boolean indication of state Examples: Detect the state of a Worker <?php $my = new Worker(); $my->start(); /* ... */ if ($my->isWorking()) {     /* ... the Worker is busy execu

Worker::isShutdown

(PECL pthreads >= 2.0.0) State Detection public boolean Worker::isShutdown ( void ) Tell if the referenced Worker has been shutdown Returns: A boolean indication of state Examples: Detect the state of a Worker <?php $my = new Worker(); $my->start(); var_dump($my->isShutdown()); $my->shutdown(); var_dump($my

Worker::getStacked

(PECL pthreads >= 2.0.0) Stack Analysis public integer Worker::getStacked ( void ) Returns the number of objects waiting to be executed by the referenced Worker Returns: An numeric value Examples: Returns the number of objects currently waiting to be executed by the referenced Worker <?php class Work extends Threade

Thread::start

(PECL pthreads >= 2.0.0) Execution public boolean Thread::start ([ integer $options ] ) Will start a new Thread to execute the implemented run method Parameters: options An optional mask of inheritance constants, by default PTHREADS_INHERIT_ALL Returns: A boolean indication of success Examples:

Thread::kill

(PECL pthreads >= 2.0.0) Execution public void Thread::kill ( void ) Forces the referenced Thread to terminate Returns: A boolean indication of success The programmer should not ordinarily kill Threads by force Examples: Kill the referenced Thread <?php class T extends T

Thread::join

(PECL pthreads >= 2.0.0) Synchronization public boolean Thread::join ( void ) Causes the calling context to wait for the referenced Thread to finish executing Returns: A boolean indication of success Examples: Join with the referenced Thread <?php class My extends Thread {     public function run() {         /* ... 

Thread::isStarted

(PECL pthreads >= 2.0.0) State Detection public boolean Thread::isStarted ( void ) Tell if the referenced Thread was started Returns: boolean indication of state Examples: Tell if the referenced Thread was started <?php $worker = new Worker(); $worker->start(); var_dump($worker->isStarted()); ?> The abov