React\Promise\Queue\SynchronousQueue::drain PHP Method

drain() private method

private drain ( )
    private function drain()
    {
        for ($i = key($this->queue); isset($this->queue[$i]); $i++) {
            $task = $this->queue[$i];
            $exception = null;
            try {
                $task();
            } catch (\Throwable $exception) {
            } catch (\Exception $exception) {
            }
            unset($this->queue[$i]);
            if ($exception) {
                throw $exception;
            }
        }
        $this->queue = [];
    }
SynchronousQueue