Dutch PHP Conference 2025 - Call For Papers

Thread::isStarted

(PECL pthreads >= 2.0.0)

Thread::isStartedState Detection

Опис

public Thread::isStarted(): bool

Tell if the referenced Thread was started

Параметри

У цієї функції немає параметрів.

Значення, що повертаються

Повертає true у разі успіху або false в разі помилки.

Приклади

Приклад #1 Tell if the referenced Thread was started

<?php
$worker
= new Worker();
$worker->start();
var_dump($worker->isStarted());
?>

Поданий вище приклад виведе:

bool(true)

add a note

User Contributed Notes 1 note

up
6
ricardo dot boss at web dot de
8 years ago
Even if you kill() a thread, the isStarted() method will still return true.
To Top