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

search for in the

Thread::join> <Thread::isTerminated
[edit] Last updated: Fri, 17 May 2013

view this page in

Thread::isWaiting

(PECL pthreads >= 0.34)

Thread::isWaitingDétection de statut

Description

final public boolean Thread::isWaiting ( void )

Indique si le Thread référencé est en attente ou non d'une notification.

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 Thread référencé

<?php
class My extends Thread {
    public function 
run() {
        
$this->synchronized(function($thread){
            
$thread->wait();
        }, 
$this);
    }
}
$my = new My();
$my->start();
$my->synchronized(function($thread){
    
var_dump($thread->isWaiting());
    
$thread->notify();
}, 
$my);
?>

L'exemple ci-dessus va afficher :

bool(true)



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

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