Worker::isShutdown
(PECL pthreads >= 2.0.0)
Worker::isShutdown — State Detection
Parameters
This function has no parameters.
Return Values
Returns whether the worker has been shutdown or not.
Examples
Example #1 Detect the state of a worker
<?php
$worker = new Worker();
$worker->start();
var_dump($worker->isShutdown());
$worker->shutdown();
var_dump($worker->isShutdown());The above example will output:
bool(false) bool(true)
↑ and ↓ to navigate • Enter to select • Esc to close • / to open