Worker::unstack

(PECL pthreads >= 2.0.0)

Worker::unstackStacking

설명

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

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

인수

work

Threaded object previously stacked onto Worker

반환값

The new length of the stack

예제

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

위 예제의 출력:

int(1)
int(0)

add a note add a note

User Contributed Notes

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