mpyw\Co\Co::getRootGenerator PHP Method

getRootGenerator() private method

Return root wrapper generator.
private getRootGenerator ( mixed $throw, mixed $value, &$return )
$throw mixed
$value mixed
    private function getRootGenerator($throw, $value, &$return)
    {
        try {
            if ($throw !== null) {
                $key = $throw ? null : CoInterface::SAFE;
            } else {
                $key = $this->options['throw'] ? null : CoInterface::SAFE;
            }
            $return = (yield $key => $value);
            return;
        } catch (\Throwable $e) {
        } catch (\Exception $e) {
        }
        $this->pool->reserveHaltException($e);
    }