Template Struct FutureAndRequestId

Struct Documentation

template<typename FutureT>
struct FutureAndRequestId

Public Functions

inline FutureAndRequestId(FutureT impl, int64_t req_id)
inline operator FutureT&()

Allow implicit conversions to std::future by reference.

inline auto get()

See std::future::get().

inline bool valid() const noexcept

See std::future::valid().

inline void wait() const

See std::future::wait().

template<class Rep, class Period>
inline std::future_status wait_for(const std::chrono::duration<Rep, Period> &timeout_duration) const

See std::future::wait_for().

template<class Clock, class Duration>
inline std::future_status wait_until(const std::chrono::time_point<Clock, Duration> &timeout_time) const

See std::future::wait_until().

FutureAndRequestId(FutureAndRequestId &&other) noexcept = default

Move constructor.

FutureAndRequestId(const FutureAndRequestId &other) = delete

Deleted copy constructor, each instance is a unique owner of the future.

FutureAndRequestId &operator=(FutureAndRequestId &&other) noexcept = default

Move assignment.

FutureAndRequestId &operator=(const FutureAndRequestId &other) = delete

Deleted copy assignment, each instance is a unique owner of the future.

~FutureAndRequestId() = default

Destructor.

Public Members

FutureT future
int64_t request_id