Worker::isShutdown
(PECL pthreads >= 0.37)
Worker::isShutdown — State Detection
Beschreibung
final public boolean Worker::isShutdown
( void
)
Tell if the referenced Worker has been shutdown
Parameter-Liste
Diese Funktion hat keine Parameter.
Rückgabewerte
A boolean indication of state
Beispiele
Beispiel #1 Detect the state of a Worker
<?php
class My extends Worker {
public function run() {
/* ... */
}
}
$my = new My();
$my->start();
var_dump($my->isShutdown());
$my->shutdown();
var_dump($my->isShutdown());
?>
Das oben gezeigte Beispiel erzeugt folgende Ausgabe:
bool(false) bool(true)
There are no user contributed notes for this page.
