(PECL pthreads < 3.0.0)
Threaded::isWaiting — ״̬���
pthreads v3 �����Ƴ��˷�����
�������Ƿ��ڵȴ������̻߳���
�˺���û�в�����
����ֵ����ʾ�Ƿ��ڵȴ�����״̬
Example #1 ������״̬
<?php
class My extends Thread {
public function run() {
$this->synchronized(function($thread){
if (!$this->done)
$thread->wait();
}, $this);
}
protected $done;
}
$my = new My();
$my->start();
$my->synchronized(function($thread){
var_dump(
$thread->isWaiting());
$thread->done = true;
$thread->notify();
}, $my);
?>
�������̻������
bool(true)