hpx::future, hpx::shared_future, hpx::make_future, hpx::make_shared_future, hpx::make_ready_future, hpx::make_ready_future_alloc, hpx::make_ready_future_at, hpx::make_ready_future_after, hpx::make_exceptional_future#

Defined in header hpx/future.hpp.

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

namespace hpx

Top level HPX namespace.

Functions

template<typename R, typename U>
hpx::future<R> make_future(hpx::future<U> &&f)#

Converts any future of type U to any other future of type R based on an existing conversion path from U to R.

template<typename R, typename U, typename Conv>
hpx::future<R> make_future(hpx::future<U> &&f, Conv &&conv)#

Converts any future of type U to any other future of type R based on a given conversion function: R conv(U).

template<typename R, typename U>
hpx::future<R> make_future(hpx::shared_future<U> f)#

Converts any shared_future of type U to any other future of type R based on an existing conversion path from U to R.

template<typename R, typename U, typename Conv>
hpx::future<R> make_future(hpx::shared_future<U> f, Conv &&conv)#

Converts any future of type U to any other future of type R based on an existing conversion path from U to R.

template<typename R>
hpx::shared_future<R> make_shared_future(hpx::future<R> &&f) noexcept#

Converts any future or shared_future of type T to a corresponding shared_future of type T.

template<typename R>
hpx::shared_future<R> &make_shared_future(hpx::shared_future<R> &f) noexcept#

Converts any future or shared_future of type T to a corresponding shared_future of type T.

template<typename R>
hpx::shared_future<R> &&make_shared_future(hpx::shared_future<R> &&f) noexcept#

Converts any future or shared_future of type T to a corresponding shared_future of type T.

template<typename R>
hpx::shared_future<R> const &make_shared_future(hpx::shared_future<R> const &f) noexcept#

Converts any future or shared_future of type T to a corresponding shared_future of type T.

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)#

Creates a pre-initialized future object with allocator (extension)

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)#

The function creates a shared state that is immediately ready and returns a future associated with that shared state. For the returned future, valid() == true and is_ready() == true.

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)#

The function creates a shared state that is immediately ready and returns a future associated with that shared state. For the returned future, valid() == true and is_ready() == true.

template<typename T>
future<T> make_exceptional_future(std::exception_ptr const &e)#

Creates a pre-initialized future object which holds the given error (extension)

template<typename T, typename E>
future<T> make_exceptional_future(E e)#

Creates a pre-initialized future object which holds the given error (extension)

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)#

Creates a pre-initialized future object which gets ready at a given point in time (extension)

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)#

Creates a pre-initialized future object which gets ready after a given point in time (extension)

template<typename Allocator>
inline future<void> make_ready_future_alloc(Allocator const &a)#
future<void> make_ready_future()#

The function creates a shared state that is immediately ready and returns a future associated with that shared state. For the returned future, valid() == true and is_ready() == true.

inline future<void> make_ready_future_at(hpx::chrono::steady_time_point const &abs_time)#

Creates a pre-initialized future object which gets ready at a given point in time (extension)

inline future<void> make_ready_future_after(hpx::chrono::steady_duration const &rel_time)#

Creates a pre-initialized future object which gets ready after a given point in time (extension)

template<typename R>
class future#
#include <future_fwd.hpp>
template<typename R>
class shared_future#
#include <future_fwd.hpp>
namespace lcos#
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)#