Stackable::isRunning
Stackable::isWaiting
Stackable
PHP Manual

# Stackable::isTerminated

(PECL pthreads >= 0.43)

Stackable::isTerminated — State Detection

### 説明

final public boolean Stackable::isTerminated ( void )

Tell if the referenced Stackable exited, suffered fatal errors, or threw uncaught exceptions during execution

### パラメータ

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

### 返り値

A boolean indication of state

### 例

例1 Detect the state of the referenced Stackable

`<?php
class Work extends Stackable {
public function run() {
i_do_not_exist();
}
}
class My extends Worker {
public function run() {
/** ... **/
}
}
$my = new My();
$work = new Work();
$my->stack($work);
$my->start();
$my->shutdown();
var_dump($work->isTerminated());
?>`

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

    bool(true)

Stackable::isRunning
Stackable::isWaiting
Stackable
PHP Manual