• PHP Video Tutorials

PHP - Thread::join() Function



Thread::join - Synchronization

Syntax

public boolean Thread::join( void )

Thread::join() function can cause the calling context to wait for a referenced Thread to finish executing.

Thread:: join() function doesn't have any parameters and can return a boolean indication of success.

Example

<?php
   class My extends Thread {
      public function run() {
         /* ... */
      }
   }
   $my = new My();
   $my->start();
   /* ... */
   var_dump($my->join());
   /* ... */
?>
php_function_reference.htm
Advertisements