protected function asyncCallOnChild($action, array $parameters = array(), callable $onResult = null, callable $onError = null)
    {
        if($this->isExternal())
        {
            throw new \RuntimeException("Calling ClientThread::CallOnChild from Child context. Did you mean ClientThread::CallOnParent?");
        }
        else
        {
            return $this->communicator->SendMessageAsync($this->encode($action, $parameters), $onResult, $onError);
        }
    }
protected function asyncCallOnChild($action, array $parameters = array(), callable $onResult = null, callable $onError = null)
    {
        if($this->isExternal())
        {
            throw new \RuntimeException("Calling ClientThread::CallOnChild from Child context. Did you mean ClientThread::CallOnParent?");
        }
        else
        {
            return $this->communicator->SendMessageAsync($this->encode($action, $parameters), $onResult, $onError);
        }
    }
protected function asyncCallOnChild ( $ action , array $ parameters = array ( ) , callable $ onResult = null , callable $ onError = null ) { if ( $ this -> isExternal ( ) ) { throw new \ RuntimeException ( "Calling ClientThread::CallOnChild from Child context. Did you mean ClientThread::CallOnParent?" ) ; } else { return $ this -> communicator -> SendMessageAsync ( $ this -> encode ( $ action , $ parameters ) , $ onResult , $ onError ) ; } }
Asynchronous variation of @see ThreadBase::callOnChild
this method returns instantly
You can ether use the @see MessageFormat::isIsResolved to check the result
Or you can provide a callback executed if the message gets resolved
If you don't matter on what the call returns just throw away the result
@param string $action
@param array $parameters
@param callable $onResult
@param callable $onError
@return AsyncMessage
Asynchronous variation of