©
이 문서에서는 PHP 중국어 웹사이트 매뉴얼 풀어 주다
(PECL pthreads >= 2.0.0)
Worker::getStacked — 栈分析
返回等待被 Worker 对象执行的对象数量
此函数没有参数。
数值
Example #1 返回等待 Worker 执行的对象数量
<?php
class Work extends Threaded {
public function run (){
}
}
$my = new Worker ();
$work = new Work ();
$my -> stack ( $work );
printf ( "My worker has %d jobs remaining\n" , $my -> getStacked ());
?>
以上例程会输出:
My worker has 5 jobs remaining