GraphLab: Distributed Graph-Parallel API
2.1
|
#include <graphlab/rpc/request_future.hpp>
Public Types | |
typedef dc_impl::function_ret_type< T > ::type | result_type |
Public Member Functions | |
request_future () | |
default constructor | |
request_future (const T &val) | |
request_future (const request_future< T > &val) | |
copy constructor | |
request_future & | operator= (const request_future< T > &val) |
operator= | |
void | wait () |
explicit call to wait(). Will wait only if the future has no value yet | |
bool | is_ready () |
result_type & | operator() () |
Public Attributes | |
std::auto_ptr < dc_impl::reply_ret_type > | reply |
result_type | result |
bool | hasval |
The result of a future_remote_request call. This class represents the outcome of a remote request sent to another machine via the future_remote_request_call. The future_remote_request call returns immediately with this object. Only when operator() is called on this object, then it waits for a result from the remote machine.
example:
The future object holds a copy of the result of the request, and the operator() call returns a reference to this result (once it is available).
Definition at line 36 of file request_future.hpp.
|
inline |
We can assign return values directly to the future in the case where no remote calls are necessary. Thus allowing the following to be written easily:
Definition at line 57 of file request_future.hpp.
|
inline |
Waits for the request if it has not yet been received. Otherwise, returns a reference to the received value.
Definition at line 96 of file request_future.hpp.