dxFeed Graal CXX API v4.0.0
|
Mixin for wrapping Promise method calls for a single event. More...
#include <Promise.hpp>
Public Member Functions | |
std::shared_ptr< E > | getResult () const |
Returns result of computation. | |
std::shared_ptr< E > | await () const |
Wait for computation to complete and return its result or throw an exception in case of exceptional completion. | |
std::shared_ptr< E > | await (std::int32_t timeoutInMilliseconds) const & |
Wait for computation to complete or timeout and return its result or throw an exception in case of exceptional completion or timeout. | |
std::shared_ptr< E > | await (const std::chrono::milliseconds &timeoutInMilliseconds) const & |
Wait for computation to complete or timeout and return its result or throw an exception in case of exceptional completion or timeout. | |
Mixin for wrapping Promise method calls for a single event.
E | The event type. |
P | The promise type. |
|
inline |
Wait for computation to complete and return its result or throw an exception in case of exceptional completion.
CancellationException | if computation was cancelled. |
PromiseException | if computation has completed exceptionally. |
|
inline |
Wait for computation to complete or timeout and return its result or throw an exception in case of exceptional completion or timeout.
timeoutInMilliseconds | The timeout. |
CancellationException | if computation was cancelled or timed out. |
PromiseException | if computation has completed exceptionally. |
|
inline |
Wait for computation to complete or timeout and return its result or throw an exception in case of exceptional completion or timeout.
timeoutInMilliseconds | The timeout. |
CancellationException | if computation was cancelled or timed out. |
PromiseException | if computation has completed exceptionally. |
|
inline |
Returns result of computation.
If computation has no result, then this method returns std::shared_ptr<E>(nullptr)
.