Worker::unstack

Unstacking work

&reftitle.description; public `int` `Worker::unstack`

Removes the first task (the oldest one) in the stack.

&reftitle.parameters; &no.function.parameters;
&reftitle.returnvalues;

The new size of the stack.

&reftitle.changelog;

&Version; | &Description;
PECL pthreads 3.0.0 | The parameter to specify the task to unstack has been removed. Now, only the first task in the stack is removed.

&reftitle.examples;

### Removing objects from the stack of Workers

    <?php
    $my = new Worker();
    $work = new class extends Threaded {};

    var_dump($my->stack($work));
    var_dump($my->unstack());

&example.outputs;

    int(1)
    int(0)