Storage for a result that can be asynchronously assigned and retrieved. More...
Public Member Functions | |
T | get (void) |
Returns the result. More... | |
bool | valid (void) const noexcept |
Returns if a result is stored. | |
void | set_value (storage_type *const p, void *const base, message_shared_ptr &m) noexcept |
Sets the result. More... | |
void | set_value (T const &value) |
Sets the result. | |
void | set_value (T &&value) |
Sets the result. More... | |
Public Types | |
typedef packed_type::storage_type | storage_type |
Storage for a result that can be asynchronously assigned and retrieved.
T | Result type. |
T stapl::runtime::async_result< T, IsBasic >::get | ( | void | ) |
Returns the result.
Calling valid() const returns false
after a call to this function.
|
noexcept |
Sets the result.
This function keeps a pointer to the buffer where the result remains packed until get() is called.
p | Pointer to the arg_storage in the buffer. |
base | Address in the buffer the arg_storage was created in. |
m | Buffer that contains the arg_storage. |
void stapl::runtime::async_result< T, IsBasic >::set_value | ( | T && | value | ) |
Sets the result.