Worker::stack
(PECL pthreads >= 2.0.0)
Worker::stack — Stacking
Описание
Appends the referenced object to the stack of the referenced Worker
Список параметров
-
work
-
Threaded object to be executed by the referenced Worker
Возвращаемые значения
The new length of the stack
Примеры
Пример #1 Stacking objects for execution in Workers
<?php
class Work extends Threaded {
/** ... **/
public function run(){
/** ... **/
}
}
$my = new Worker();
$work = new Work();
/** ... **/
var_dump($my->stack($work));
/** ... **/
?>
Результат выполнения данного примера:
int(1)
Коментарии
404 Not Found