Worker::stack
(PECL pthreads >= 0.36)
Worker::stack — Stacking
Descrizione
Appends the referenced Stackable to the stack of the referenced Worker
Elenco dei parametri
-
work -
An object of type Stackable to be executed by the referenced Worker
Valori restituiti
The new length of the stack
Esempi
Example #1 Passing Stackables to Workers for execution in the Worker Thread
<?php
class Work extends Stackable {
/** ... **/
public function run(){
/** ... **/
}
}
class My extends Worker {
public function run(){
/** ... **/
}
}
$my = new My();
/** ... **/
var_dump($my->stack(new Work()));
/** ... **/
?>
Il precedente esempio visualizzerĂ :
int(1)
There are no user contributed notes for this page.
