• PHP Video Tutorials

PHP - Worker::isWorking() Function



Worker::isWorking - State Detection

Syntax

public boolean Worker::isWorking( void )

Worker::isWorking() function can tell if Worker is executing Stackables.

Worker::isWorking() function doesn't have any parameters and can return a boolean indication of the state.

Example

<?php
   class My extends Worker {
      public function run() {
         /* ... */
      }
   }
   $my = new My();
   $my->start();
   
   if($my->isWorking()) {
      /* ... the Worker is busy executing another object */
   }
?>
php_function_reference.htm
Advertisements