Worker::isShutdown

(PECL pthreads >= 2.0.0)

Worker::isShutdownState Detection

Opis

public Worker::isShutdown ( void ) : bool

Whether the worker has been shutdown or not.

Parametry

Ta funkcja nie posiada parametrów.

Zwracane wartości

Returns whether the worker has been shutdown or not.

Przykłady

Przykład #1 Detect the state of a worker

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

var_dump($worker->isShutdown());

$worker->shutdown();

var_dump($worker->isShutdown());

Powyższy przykład wyświetli:

bool(false)
bool(true)

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top