hpx/futures/future.hpp

See Public API for a list of names and headers that are part of the public HPX API.

Defines

HPX_MAKE_EXCEPTIONAL_FUTURE(T, errorcode, f, msg)
namespace hpx

Functions

template<typename R, typename U>
hpx::future<R> make_future(hpx::future<U> &&f)
template<typename R, typename U, typename Conv>
hpx::future<R> make_future(hpx::future<U> &&f, Conv &&conv)
template<typename R, typename U>
hpx::future<R> make_future(hpx::shared_future<U> f)
template<typename R, typename U, typename Conv>
hpx::future<R> make_future(hpx::shared_future<U> f, Conv &&conv)
template<typename R>
hpx::shared_future<R> make_shared_future(hpx::future<R> &&f)
template<typename R>
hpx::shared_future<R> &make_shared_future(hpx::shared_future<R> &f)
template<typename R>
hpx::shared_future<R> &&make_shared_future(hpx::shared_future<R> &&f)
template<typename R>
hpx::shared_future<R> const &make_shared_future(hpx::shared_future<R> const &f)
template<typename T, typename Allocator, typename ...Ts>
std::enable_if_t<std::is_constructible_v<T, Ts&&...> || std::is_void_v<T>, future<T>> make_ready_future_alloc(Allocator const &a, Ts&&... ts)
template<typename T, typename ...Ts>
std::enable_if_t<std::is_constructible_v<T, Ts&&...> || std::is_void_v<T>, future<T>> make_ready_future(Ts&&... ts)
template<int DeductionGuard = 0, typename Allocator, typename T>
future<hpx::util::decay_unwrap_t<T>> make_ready_future_alloc(Allocator const &a, T &&init)
template<int DeductionGuard = 0, typename T>
future<hpx::util::decay_unwrap_t<T>> make_ready_future(T &&init)
template<typename T>
future<T> make_exceptional_future(std::exception_ptr const &e)
template<typename T, typename E>
future<T> make_exceptional_future(E e)
template<int DeductionGuard = 0, typename T>
future<hpx::util::decay_unwrap_t<T>> make_ready_future_at(hpx::chrono::steady_time_point const &abs_time, T &&init)
template<int DeductionGuard = 0, typename T>
future<hpx::util::decay_unwrap_t<T>> make_ready_future_after(hpx::chrono::steady_duration const &rel_time, T &&init)
template<typename Allocator>
future<void> make_ready_future_alloc(Allocator const &a)
future<void> make_ready_future()
future<void> make_ready_future_at(hpx::chrono::steady_time_point const &abs_time)
future<void> make_ready_future_after(hpx::chrono::steady_duration const &rel_time)
template<typename R>
class future : public hpx::lcos::detail::future_base<future<R>, R>

Public Types

template<>
using result_type = R
template<>
using shared_state_type = typename base_type::shared_state_type
template<>
using completion_signatures = typename base_type::completion_signatures

Public Functions

constexpr future()
future(future &&other)
future(future<future> &&other)
future(future<shared_future<R>> &&other)
template<typename T>
future(future<T> &&other, std::enable_if_t<std::is_void_v<R> && !traits::is_future_v<T>, T>* = nullptr)
~future()
future &operator=(future &&other)
shared_future<R> share()
hpx::traits::future_traits<future>::result_type get()
hpx::traits::future_traits<future>::result_type get(error_code &ec)
template<typename F>
decltype(auto) then(F &&f, error_code &ec = throws)
template<typename T0, typename F>
decltype(auto) then(T0 &&t0, F &&f, error_code &ec = throws)
template<typename Allocator, typename F>
auto then_alloc(Allocator const &alloc, F &&f, error_code &ec = throws)

Private Types

template<>
using base_type = lcos::detail::future_base<future<R>, R>

Private Functions

future(hpx::intrusive_ptr<shared_state_type> const &state)
future(hpx::intrusive_ptr<shared_state_type> &&state)
template<typename SharedState>
future(hpx::intrusive_ptr<SharedState> const &state)

Friends

friend hpx::hpx::traits::future_access
template<typename Receiver>
lcos::detail::operation_state<Receiver, future> tag_invoke(hpx::execution::experimental::connect_t, future &&f, Receiver &&receiver)
struct invalidate

Public Functions

template<>
constexpr invalidate(future &f)
template<>
~invalidate()

Public Members

template<>
future &f_
template<typename R>
class shared_future : public hpx::lcos::detail::future_base<shared_future<R>, R>

Public Types

template<>
using result_type = R
template<>
using shared_state_type = typename base_type::shared_state_type
template<>
using completion_signatures = typename base_type::completion_signatures

Public Functions

constexpr shared_future()
shared_future(shared_future const &other)
shared_future(shared_future &&other)
shared_future(future<R> &&other)
shared_future(future<shared_future> &&other)
template<typename T>
shared_future(shared_future<T> const &other, std::enable_if_t<std::is_void_v<R> && !traits::is_future_v<T>, T>* = nullptr)
~shared_future()
shared_future &operator=(shared_future const &other)
shared_future &operator=(shared_future &&other)
hpx::traits::future_traits<shared_future>::result_type get() const
hpx::traits::future_traits<shared_future>::result_type get(error_code &ec) const
template<typename F>
decltype(auto) then(F &&f, error_code &ec = throws) const
template<typename T0, typename F>
decltype(auto) then(T0 &&t0, F &&f, error_code &ec = throws) const
template<typename Allocator, typename F>
auto then_alloc(Allocator const &alloc, F &&f, error_code &ec = throws)

Private Types

template<>
using base_type = lcos::detail::future_base<shared_future<R>, R>

Private Functions

shared_future(hpx::intrusive_ptr<shared_state_type> const &state)
shared_future(hpx::intrusive_ptr<shared_state_type> &&state)
template<typename SharedState>
shared_future(hpx::intrusive_ptr<SharedState> const &state)

Friends

friend hpx::hpx::traits::future_access
template<typename Receiver>
lcos::detail::operation_state<Receiver, shared_future> tag_invoke(hpx::execution::experimental::connect_t, shared_future &&f, Receiver &&receiver)
template<typename Receiver>
lcos::detail::operation_state<Receiver, shared_future> tag_invoke(hpx::execution::experimental::connect_t, shared_future &f, Receiver &&receiver)
namespace lcos

Functions

template<typename R, typename U>hpx::lcos::HPX_DEPRECATED_V(1, 8, "hpx::lcos::make_future is deprecated. Use hpx::make_future instead.")
template<typename R, typename U, typename Conv>hpx::lcos::HPX_DEPRECATED_V(1, 8, "hpx::lcos::make_future is deprecated. Use hpx::make_future instead.")
template<typename T, typename Allocator, typename... Ts>hpx::lcos::HPX_DEPRECATED_V(1, 8, "hpx::lcos::make_ready_future_alloc is deprecated. Use " "hpx::make_ready_future_alloc instead.")
template<typename T, typename... Ts>hpx::lcos::HPX_DEPRECATED_V(1, 8, "hpx::lcos::make_ready_future is deprecated. Use " "hpx::make_ready_future instead.")
template<typename T>hpx::lcos::HPX_DEPRECATED_V(1, 8, "hpx::lcos::make_exceptional_future is deprecated. Use " "hpx::make_exceptional_future instead.")
template<typename T, typename E>hpx::lcos::HPX_DEPRECATED_V(1, 8, "hpx::lcos::make_exceptional_future is deprecated. Use " "hpx::make_exceptional_future instead.")
template<int DeductionGuard = 0, typename T>hpx::lcos::HPX_DEPRECATED_V(1, 8, "hpx::lcos::make_ready_future_at is deprecated. Use " "hpx::make_ready_future_at instead.")
template<int DeductionGuard = 0, typename T>hpx::lcos::HPX_DEPRECATED_V(1, 8, "hpx::lcos::make_ready_future_after is deprecated. Use " "hpx::make_ready_future_after instead.")
template<typename Allocator>hpx::lcos::HPX_DEPRECATED_V(1, 8, "hpx::lcos::make_ready_future_alloc is deprecated. Use " "hpx::make_ready_future_alloc instead.")
template<typename T>hpx::lcos::HPX_DEPRECATED_V(1, 8, "hpx::lcos::make_ready_future is deprecated. Use " "hpx::make_ready_future instead.")
template<typename T>hpx::lcos::HPX_DEPRECATED_V(1, 8, "hpx::lcos::make_ready_future_at is deprecated. Use " "hpx::make_ready_future_at instead.")
template<typename T>hpx::lcos::HPX_DEPRECATED_V(1, 8, "hpx::lcos::make_ready_future_after is deprecated. Use " "hpx::make_ready_future_after instead.")
namespace serialization

Functions

template<typename Archive, typename T>
void serialize(Archive &ar, ::hpx::future<T> &f, unsigned version)
template<typename Archive, typename T>
void serialize(Archive &ar, ::hpx::shared_future<T> &f, unsigned version)