public function flush($max = 10, $options = [])
    {
        $defaults = [
            'selectTimeout'  => 1.0
        ];

        $options += $defaults;

        do {
            $this->select($options['selectTimeout']);
            $this->process($max);
        } while ($this->_running > 0);

        $results = $this->_results;
        $this->_results = [];
        return $results;
    }