Worker::unstack

(PECL pthreads >= 0.36)

Worker::unstack — Stacking


Описание

final public int Worker::unstack ([ Stackable $work ] )

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


Примеры

Пример #1 Removing Stackables from Workers

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));

Результат выполнения данного примера:


int(1)
int(0)


User Contributed Notes


There are no user contributed notes for this page.
To Top

Описание класса worker, примеры использования класса worker.



Смотрите также:
Описание на ru2.php.net
Описание на php.ru