(PECL pthreads >= 2.0.0)
Threaded::wait — Synchronisation
$timeout = ?): boolFera attendre le contexte appelant une notification depuis l'objet référencé.
timeoutUn délai d'attente maximal optionnel, en microsecondes.
   Cette fonction retourne true en cas de succès ou false si une erreur survient.
  
Exemple #1 Notifications et attente
<?php
class My extends Thread {
    public function run() {
        /** Fait patienter ce thread **/
        $this->synchronized(function($thread){
            if (!$thread->done)
                $thread->wait();
        }, $this);
    }
}
$my = new My();
$my->start();
/** Envoi la notification au threadé qui attend **/
$my->synchronized(function($thread){
    $thread->done = true;
    $thread->notify();
}, $my);
var_dump($my->join());
?>
L'exemple ci-dessus va afficher :
bool(true)