Worker::isShutdown

State Detection

説明

public bool Worker::isShutdown()

Whether the worker has been shutdown or not.

パラメータ

この関数にはパラメータはありません。

戻り値

Returns whether the worker has been shutdown or not.

例1 Detect the state of a worker

<?php
$worker 
= new Worker();
$worker->start();

var_dump($worker->isShutdown());

$worker->shutdown();

var_dump($worker->isShutdown());

上の例の出力は以下となります。

bool(false)
bool(true)