(PECL pthreads >= 0.36)
Worker::unstack — Stacking
Removes the referenced Stackable ( or all Stackables if parameters are void ) from stack of the referenced Worker
work
An object of type Stackable
The new length of the stack
Example #1 Removing Stackables from Workers
<?php
class Work extends Stackable {
public function run() {
}
}
class My extends Worker {
public function run() {
/** ... **/
}
}
$my = new My();
$work = new Work();
var_dump($my->stack($work));
var_dump($my->unstack($work));
?>
Exemplul de mai sus va afișa:
int(1) int(0)