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 71 of file AsyncDelegate.hpp.
|
inline |
Definition at line 79 of file AsyncDelegate.hpp.
|
inline |
Call func
on remote node, returning immediately.
Definition at line 95 of file AsyncDelegate.hpp.
|
inline |
Definition at line 81 of file AsyncDelegate.hpp.
|
inline |
Block on result being returned.
Definition at line 86 of file AsyncDelegate.hpp.