PHP 8.4.1 Released!

Worker::isShutdown

(PECL pthreads >= 2.0.0)

Worker::isShutdownState Detection

説明

public Worker::isShutdown(): bool

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)

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top