PHP - Fonction Worker :: isWorking ()

Worker :: isWorking - Détection d'état

Syntaxe

public boolean Worker::isWorking( void )

La fonction Worker :: isWorking () peut dire si Worker exécute Stackables.

La fonction Worker :: isWorking () n'a aucun paramètre et peut renvoyer une indication booléenne de l'état.

Exemple

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