コード例 #1
0
ファイル: future.cpp プロジェクト: ZhaozhengPlus/libqi
 const std::string &FutureBase::error(int msecs) const {
   if (wait(msecs) == FutureState_Running)
     throw FutureException(FutureException::ExceptionState_FutureTimeout);
   if (_p->_state.load() != FutureState_FinishedWithError)
     throw FutureException(FutureException::ExceptionState_FutureHasNoError);
   return _p->_error;
 }
コード例 #2
0
ファイル: future.cpp プロジェクト: aldebaran/libqi
 const std::string &FutureBase::error(int msecs) const {
   if (wait(msecs) == FutureState_Running)
     throw FutureException(FutureException::ExceptionState_FutureTimeout);
   if (_p->_state.load() != FutureState_FinishedWithError)
     throw FutureException(FutureException::ExceptionState_FutureHasNoError);
   boost::recursive_mutex::scoped_lock lock(_p->_mutex);
   return _p->_error;
 }
コード例 #3
0
ファイル: future.cpp プロジェクト: ZhaozhengPlus/libqi
 bool FutureBase::hasValue(int msecs) const {
   if (wait(msecs) == FutureState_Running)
     throw FutureException(FutureException::ExceptionState_FutureTimeout);
   return _p->_state.load() == FutureState_FinishedWithValue;
 }
コード例 #4
0
ファイル: future.cpp プロジェクト: dmerejkowsky/libqi
 bool FutureBase::hasError(int msecs) const {
   if (wait(msecs) == FutureState_Running)
     throw FutureException(FutureException::ExceptionState_FutureTimeout);
   return *_p->_state == FutureState_FinishedWithError;
 }