PHP - Fonction Thread :: isJoined ()

Thread :: isJoined - Détection d'état

Syntaxe

public boolean Thread::isJoined( void )

La fonction Thread :: isJoined () peut dire si le Thread référencé a été joint.

La fonction Thread :: isJoined () n'a aucun paramètre et peut retourner une indication booléenne de l'état.

Exemple

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