src/Co.php
private function start($value, $wait = true, $throw = null)
    {
        $return = null;
        // For convenience, all values are wrapped into generator
        $con = YieldableUtils::normalize($this->getRootGenerator($throw, $value, $return));
        $promise = $this->processGeneratorContainerRunning($con);
        if ($promise instanceof ExtendedPromiseInterface) {
            // This is actually 100% true; just used for unwrapping Exception thrown.
            $promise->done();
        }
        // We have to wait $return only if $wait
        if ($wait) {
            $this->pool->wait();
            return $return;
        }
    }
private function start($value, $wait = true, $throw = null)
    {
        $return = null;
        // For convenience, all values are wrapped into generator
        $con = YieldableUtils::normalize($this->getRootGenerator($throw, $value, $return));
        $promise = $this->processGeneratorContainerRunning($con);
        if ($promise instanceof ExtendedPromiseInterface) {
            // This is actually 100% true; just used for unwrapping Exception thrown.
            $promise->done();
        }
        // We have to wait $return only if $wait
        if ($wait) {
            $this->pool->wait();
            return $return;
        }
    }
private function start ( $ value , $ wait = true , $ throw = null ) { $ return = null ; // For convenience, all values are wrapped into generator $ con = YieldableUtils :: normalize ( $ this -> getRootGenerator ( $ throw , $ value , $ return ) ) ; $ promise = $ this -> processGeneratorContainerRunning ( $ con ) ; if ( $ promise instanceof ExtendedPromiseInterface ) { // This is actually 100% true; just used for unwrapping Exception thrown. $ promise -> done ( ) ; } // We have to wait $return only if $wait if ( $ wait ) { $ this -> pool -> wait ( ) ; return $ return ; } }
Start resovling.
@param  mixed    $value
@param  bool     $wait
@param  mixed    $throw  Used for Co::async() overrides.
@param  mixed    If $wait, return resolved value.
Start resovling .