mpyw\Co\Internal\ControlUtils::reverse PHP 메소드

reverse() 공개 정적인 메소드

Handle success as ControlException, failure as resolved.
public static reverse ( mixed $yieldable ) : Generator
$yieldable mixed
리턴 Generator
    public static function reverse($yieldable)
    {
        try {
            $result = (yield $yieldable);
        } catch (\RuntimeException $e) {
            (yield CoInterface::RETURN_WITH => $e);
        }
        throw new ControlException($result);
    }