update : 2015.11.03
php.shukuma.com

검색:
 
 
Synchronization

Thread::join

(PECL pthreads >= 2.0.0)

Thread::joinSynchronization

설명

public boolean Thread::join ( void )

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

인수

이 함수는 인수가 없습니다.

반환값

A boolean indication of success

예제

Example #1 Join with the referenced Thread

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

위 예제의 출력:

bool(true)