©
Dieses Dokument verwendet PHP-Handbuch für chinesische Websites Freigeben
(PECL pthreads >= 2.0.0)
Worker::unstack — 栈操作
&$work
] )从 Worker 栈中出栈对象,如果不提供参数,则表示移除 Worker 栈中全部对象
work
已经入栈的对象
Worker 对象栈长度
Example #1 从 Worker 栈中移除对象
<?php
class Work extends Threaded {
public function run () {
}
}
$my = new Worker ();
$work = new Work ();
var_dump ( $my -> stack ( $work ));
var_dump ( $my -> unstack ( $work ));
?>
以上例程会输出:
int(1) int(0)