Worker
PHP Manual

Worker::unstack

(PECL pthreads >= 2.0.0)

Worker::unstackStacking

Beschreibung

public integer Worker::unstack ([ Threaded &$work ] )

Removes the referenced object ( or all objects if parameters are void ) from stack of the referenced Worker

Parameter-Liste

work

Threaded object previously stacked onto Worker

Rückgabewerte

The new length of the stack

Beispiele

Beispiel #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));
?>

Das oben gezeigte Beispiel erzeugt folgende Ausgabe:

int(1)
int(0)


Worker
PHP Manual