GoLang Thread::join

request it (404)
GoLang replacement for PHP's Thread::join [edit | history]



Do you know a GoLang replacement for PHP's Thread::join? Write it!

PHP Thread::join

PHP original manual for Thread::join [ show | php.net ]

Thread::join

(PECL pthreads >= 2.0.0)

Thread::joinSynchronization

Description

public bool Thread::join ( void )

Causes the calling context to wait for the referenced Thread to finish executing

Parameters

This function has no parameters.

Return Values

A boolean indication of success

Examples

Example #1 Join with the referenced Thread

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

The above example will output:

bool(true)