Worker::isWorking() - 状态检测。更多的相关函数请看:PHP Worker 函数
语法
public boolean Worker::isWorking( void )
Worker::isWorking() 函数判断 Worker 是否正在执行 Stackables。
Worker::isWorking() 函数没有任何参数,可以返回状态的布尔值。
示例
<?php
class My extends Worker {
public function run() {
/* ... */
}
}
$my = new My();
$my->start();
if($my->isWorking()) {
/* ... Worker 正忙于执行另一个对象 */
}
?>