downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

Stackable::isTerminated> <Stackable
[edit] Last updated: Fri, 24 May 2013

view this page in

Stackable::isRunning

(PECL pthreads >= 0.36)

Stackable::isRunningDétection de statut

Description

final public boolean Stackable::isRunning ( void )

Un Stackable est en cours d'exécution lorsqu'un Thread Worker l'exécute.

Liste de paramètres

Cette fonction ne contient aucun paramètre.

Valeurs de retour

Un booléen indiquant le statut de l'opération.

Exemples

Exemple #1 Détecte le statut du Stackable référencé

<?php
class Work extends Stackable {
    public function 
run() {
        
$this->synchronized(function($object){
            
$object->wait();
        }, 
$this);
    }
}

class 
My extends Worker {
    public function 
run() {
        
/** ... **/
    
}
}

$my = new My();
$work = new Work();
$my->stack($work);
$my->start();
$work->synchronized(function($object){
        
$object->notify();
}, 
$work);
?>

L'exemple ci-dessus va afficher :

bool(true)



add a note add a note User Contributed Notes Stackable::isRunning - [0 notes]
There are no user contributed notes for this page.

 
show source | credits | sitemap | contact | advertising | mirror sites