(PECL pthreads >= 2.0.0)
Threaded::notify — Synchronisation
Envoi une notification à l'objet référencé
Cette fonction ne contient aucun paramètre.
   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 que le thread patiente **/
        $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)