A 'Promise' is a wrapper around a FullEmpty for async delegates with return values. More...
#include <AsyncDelegate.hpp>
Public Member Functions | |
Promise () | |
void | fill (const R &r) |
const R | get () |
Block on result being returned. More... | |
template<typename F > | |
void | call_async (Core dest, F func) |
Call func on remote node, returning immediately. More... | |
A 'Promise' is a wrapper around a FullEmpty for async delegates with return values.
The idea is to allocate storage for the result, issue the delegate request, and then block on waiting for the value when it's needed.
Example:
Definition at line 60 of file AsyncDelegate.hpp.
|
inline |
Definition at line 68 of file AsyncDelegate.hpp.
|
inline |
Call func
on remote node, returning immediately.
Definition at line 84 of file AsyncDelegate.hpp.
|
inline |
Definition at line 70 of file AsyncDelegate.hpp.
|
inline |
Block on result being returned.
Definition at line 75 of file AsyncDelegate.hpp.