31 #include <boost/shared_ptr.hpp>
32 #include <boost/format.hpp>
33 #include <boost/thread/mutex.hpp>
34 #include <boost/thread/condition.hpp>
36 #include "rsc/rscexports.h"
153 R
get(
double timeout) {
154 MutexType::scoped_lock lock(
mutex);
159 #if BOOST_VERSION >= 105000
160 if (!
condition.timed_wait(lock, boost::posix_time::microseconds(
long(timeout) * 1000000))) {
163 boost::xtime_get(&xt, boost::TIME_UTC);
170 "Timeout while waiting for result. Waited %1% seconds.")
191 MutexType::scoped_lock lock(
mutex);
203 MutexType::scoped_lock lock(
mutex);
217 MutexType::scoped_lock lock(
mutex);
Thrown when the execution of a Future's task does not complete within the specified amount of time...
bool isDone()
Tells whether the computation of the underlying process finished and provided a result or generated a...
boost::condition ConditionType
Thrown when the result of the computation represented by a future is not available for some reason...
ConditionType & getCondition()
Class providing access to the result of a process that is asynchronously running. ...
void set(R data)
Provide the result for this future.
Exception that is thrown if the result of a Future is not available because the underlying process ge...
void setError(const std::string &message)
Indicate an error while processing.
Future()
Create a new Future object that does not have a result and is thus suitable for representing an in-pr...