(PECL pthreads >= 2.0.0)
Worker::unstack — Stacking
Removes the referenced object ( or all objects if parameters are void ) from stack of the referenced Worker
work
Threaded object previously stacked onto Worker
The new length of the stack
Example #1 Removing objects from the stack of Workers
<?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)