(PECL pthreads >= 2.0.0)
Thread::isJoined — 状态锟斤拷锟�
锟竭筹拷锟角凤拷锟窖撅拷锟斤拷锟斤拷锟诫(join锟斤拷
锟剿猴拷锟斤拷没锟叫诧拷锟斤拷锟斤拷
锟斤拷锟斤拷值锟斤拷锟斤拷示锟角否被硷拷锟斤拷
Example #1 锟斤拷锟斤拷叱锟阶刺�
<?php
class My extends Thread {
public function run() {
$this->synchronized(function($thread){
if (!$thread->done)
$thread->wait();
}, $this);
}
}
$my = new My();
$my->start();
var_dump($my->isJoined());
$my->synchronized(function($thread){
$thread->done = true;
$thread->notify();
}, $my);
?>
锟斤拷锟斤拷锟斤拷锟教伙拷锟斤拷锟斤拷锟�
bool(false)