Worker::isShutdown
PHP function
Edit on GitHub ✎
(PECL pthreads >= 2.0.0)
State Detection
Description
Worker::isShutdown(): bool
Whether the worker has been shutdown or not.
Parameters Parameters
Return Values
Returns whether the worker has been shutdown or not.
Examples
Detect the state of a worker
php
<?php
$worker = new Worker();
$worker->start();
var_dump($worker->isShutdown());
$worker->shutdown();
var_dump($worker->isShutdown());The above example will output:
output
bool(false)
bool(true)