GoLang Worker::isShutdown

request it (364)
GoLang replacement for PHP's Worker::isShutdown [edit | history]



Do you know a GoLang replacement for PHP's Worker::isShutdown? Write it!

PHP Worker::isShutdown

PHP original manual for Worker::isShutdown [ show | php.net ]

Worker::isShutdown

(PECL pthreads >= 2.0.0)

Worker::isShutdownState Detection

Description

public bool Worker::isShutdown ( void )

Whether the worker has been shutdown or not.

Parameters

This function has no parameters.

Return Values

Returns whether the worker has been shutdown or not.

Examples

Example #1 Detect the state of a worker

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

var_dump($worker->isShutdown());

$worker->shutdown();

var_dump($worker->isShutdown());

The above example will output:

bool(false)
bool(true)