PHPDaemon\Structures\StackCallbacks::executeOne PHP Method

executeOne() public method

Executes one callback from the top with given arguments
public executeOne ( $args ) : boolean
$args Arguments
return boolean
    public function executeOne(...$args)
    {
        if ($this->isEmpty()) {
            return false;
        }
        $cb = $this->shift();
        if ($cb) {
            $cb(...$args);
            if ($cb instanceof CallbackWrapper) {
                $cb->cancel();
            }
        }
        return true;
    }