Flow/PromisePool.php
public function callAllPromises()
    {
        $pool = $this->pool;

        usort($pool, function ($a, $b) {
            return $a['priority'] - $b['priority'];
        });

        foreach ($pool as $node) {
            $promise = $node['promise'];
            $promise();
        }
    }
public function callAllPromises()
    {
        $pool = $this->pool;

        usort($pool, function ($a, $b) {
            return $a['priority'] - $b['priority'];
        });

        foreach ($pool as $node) {
            $promise = $node['promise'];
            $promise();
        }
    }
public function callAllPromises ( ) { $ pool = $ this -> pool ; usort ( $ pool , function ( $ a , $ b ) { return $ a [ 'priority' ] - $ b [ 'priority' ] ; } ) ; foreach ( $ pool as $ node ) { $ promise = $ node [ 'promise' ] ; $ promise ( ) ; } }
Call all callbacks ordered by priority
Call all callbacks ordered by priority