26namespace OnixS {
namespace System {
class FutureSharedState; }}
57 return state_ !=
nullptr;
132 const
System::FutureSharedState * state_;
186 FutureBase::operator=(other);
194 FutureBase::operator=(std::move(other));
204 return *
reinterpret_cast<const T *
>(
getValuePtr());
209 FutureBase::swap(other);
215 : FutureBase(state) {}
218 SharedFuture(
const System::FutureSharedState * state, moving_init_t t) noexcept
219 : FutureBase(state, t) {}
221 friend class Implementation::FutureHelper;
#define ONIXS_ICEBOE_NAMESPACE_BEGIN
#define ONIXS_ICEBOE_NAMESPACE_END
#define ONIXS_ICEBOE_EXPORTED
Base implementation of SharedFuture<T>.
void swap(FutureBase &other) noexcept
friend class FutureHelper
FutureBase & operator=(const FutureBase &other) noexcept
const void * getValuePtr() const
FutureBase(FutureBase &&other) noexcept
bool has_exception() const
Returns true if the asynchronous result associated with this Future has a stored exception,...
FutureStatus::Enum wait(int timeoutInMs) const
Waits for the result to become available during the timeout.
FutureBase(const FutureBase &other) noexcept
FutureBase(const System::FutureSharedState *state) noexcept
Initializes the instance with shared state.
bool has_value() const
Returns true if the asynchronous result associated with this Future has a stored value,...
bool valid() const noexcept
Check if a future instance is associated with an asynchronous result.
~FutureBase() noexcept
Destroys a future object.
FutureBase(const System::FutureSharedState *state, moving_init_t) noexcept
Initializes the instance with shared state.
std::exception_ptr get_exception_ptr() const
Returns the stored exception.
bool is_ready() const
Returns true if the asynchronous result associated with this Future is ready (has a value or exceptio...
FutureBase & operator=(FutureBase &&other) noexcept
Represents a future result of an asynchronous operation - a result that will eventually appear in the...
void swap(SharedFuture< T > &other) noexcept
swaps two SharedFuture objects
SharedFuture(const SharedFuture< T > &other) noexcept
Copy constructor.
SharedFuture(SharedFuture< T > &&other) noexcept
FutureBase & operator=(SharedFuture< T > &&other) noexcept
Implementation::FutureGetReturn< T >::Type get() const
Returns the result.
SharedFuture< T > & operator=(const SharedFuture< T > &other) noexcept
Copy assignment.
State of a SharedFuture object (similar to std::future_status,.
@ timeout
the shared state did not become ready before specified timeout duration has passed.
@ ready
the shared state is ready.
@ deferred
the shared state contains a deferred function, so the result will be computed only when explicitly re...