Регистрация Войти
Войти через VK Войти через FB Войти через Google Войти через Яндекс
Войти через VK Войти через FB Войти через Google Войти через Яндекс
Поиск по сайту
Thread::isRunning
(PECL pthreads >= 0.34)
Thread::isRunning — State Detection
Описание
final public boolean Thread::isRunning ( void )Tell if the referenced Thread is executing
Список параметров
У этой функции нет параметров.
Возвращаемые значения
A boolean indication of state
Замечание:
A Thread is considered running while executing the run method
Примеры
Пример #1 Detect the state of the referenced Thread
class My extends Thread {
public function run() {
$this->synchronized(function($thread){
$thread->wait();
}, $this);
}
}
$my = new My();
$my->start();
var_dump($my->isRunning());
$my->synchronized(function($thread){
$thread->notify();
}, $my);
Результат выполнения данного примера:
bool(true)
User Contributed Notes
There are no user contributed notes for this page.

Описание класса thread, примеры использования класса thread.
Смотрите также:
Описание на ru2.php.net
Описание на php.ru