CakeFest 2024: The Official CakePHP Conference

Worker::isShutdown

(PECL pthreads >= 2.0.0)

Worker::isShutdownDétection de statut

Description

public Worker::isShutdown(): bool

Indique si le Worker a été arrêté ou non.

Liste de paramètres

Cette fonction ne contient aucun paramètre.

Valeurs de retour

Retourne si le Worker a été arrêté ou non.

Exemples

Exemple #1 Détecte le statut d'un worker

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

var_dump($worker->isShutdown());

$worker->shutdown();

var_dump($worker->isShutdown());

L'exemple ci-dessus va afficher :

bool(false)
bool(true)

add a note

User Contributed Notes

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