PHP 7.2.0 Release Candidate 4 Released

Worker::isShutdown

(PECL pthreads >= 2.0.0)

Worker::isShutdownState Detection

Descripción

public bool Worker::isShutdown ( void )

Whether the worker has been shutdown or not.

Parámetros

Esta función no tiene parámetros.

Valores devueltos

Returns whether the worker has been shutdown or not.

Ejemplos

Ejemplo #1 Detect the state of a worker

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

var_dump($worker->isShutdown());

$worker->shutdown();

var_dump($worker->isShutdown());

El resultado del ejemplo sería:

bool(false)
bool(true)

add a note add a note

User Contributed Notes

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