|
RADLib
RADical C++ application framework
|
Shared future wrapper returning RADVariant results. More...
#include <RADCore.h>
Public Member Functions | |
| RADFuture () | |
| Creates an invalid future. More... | |
| RADFuture (std::shared_ptr< std::shared_future< RADVariant >> future) | |
| Wraps an existing shared future. More... | |
| bool | isValid () const |
| Returns true when a future is present. More... | |
| bool | isFinished () const |
| Returns true when the result is ready. More... | |
| RADVariant | result (RADVariant defaultValue={}) const |
| Returns result or defaultValue if not ready or failed. More... | |
| void | wait () const |
| Blocks until the future is ready. More... | |
Shared future wrapper returning RADVariant results.
| RADCore::RADFuture::RADFuture | ( | ) |
Creates an invalid future.
|
explicit |
Wraps an existing shared future.
| bool RADCore::RADFuture::isFinished | ( | ) | const |
Returns true when the result is ready.
| bool RADCore::RADFuture::isValid | ( | ) | const |
Returns true when a future is present.
| RADVariant RADCore::RADFuture::result | ( | RADVariant | defaultValue = {} | ) | const |
Returns result or defaultValue if not ready or failed.
| void RADCore::RADFuture::wait | ( | ) | const |
Blocks until the future is ready.