Worker::isShutdown
(PECL pthreads >= 2.0.0)
Worker::isShutdown — 状态检测
说明
public Worker::isShutdown(): bool
Worker 对象是否被关闭
参数
此函数没有参数。
返回值
布尔值,表示 worker 是否已经被关闭
范例
示例 #1 检测 Worker 对象状态
<?php
$worker = new Worker();
$worker->start();
var_dump($worker->isShutdown());
$worker->shutdown();
var_dump($worker->isShutdown());
以上例程会输出:
bool(false) bool(true)

User Contributed Notes
There are no user contributed notes for this page.