futures¶
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
, typenameU
, typenameConv
>
hpx::future<R>make_future
(hpx::future<U> &&f, Conv &&conv)¶
-
template<typename
T
, typenameAllocator
, 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, typenameAllocator
, typenameT
>
future<hpx::util::decay_unwrap_t<T>>make_ready_future_alloc
(Allocator const &a, T &&init)¶
-
template<int
DeductionGuard
= 0, typenameT
>
future<hpx::util::decay_unwrap_t<T>>make_ready_future
(T &&init)¶
-
template<int
DeductionGuard
= 0, typenameT
>
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, typenameT
>
future<hpx::util::decay_unwrap_t<T>>make_ready_future_after
(hpx::chrono::steady_duration const &rel_time, T &&init)¶
-
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
>
classfuture
: public hpx::lcos::detail::future_base<future<R>, R>¶ -
Public Functions
-
constexpr
future
()¶
-
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)¶
-
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
, typenameF
>
decltype(auto)then
(T0 &&t0, F &&f, error_code &ec = throws)¶
-
template<typename
Allocator
, typenameF
>
autothen_alloc
(Allocator const &alloc, F &&f, error_code &ec = throws)¶
Private Functions
Friends
-
friend
hpx::hpx::traits::future_access
-
constexpr
Public Types
Public Functions
Private Types
Private Functions
Friends
-
friend
hpx::hpx::traits::future_access
-
friend
-
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
-
template<typename
-
namespace
hpx
-
namespace
lcos
-
namespace
-
namespace
hpx
-
namespace
lcos
-
namespace
local
-
template<typename
Result
, boolCancelable
>
classfutures_factory
<Result(), Cancelable>¶ Public Functions
-
futures_factory
()¶
-
template<typename
F
, typenameEnable
= std::enable_if_t<!std::is_same_v<std::decay_t<F>, futures_factory>>>futures_factory
(F &&f)¶
-
futures_factory
(Result (*f)())¶
-
~futures_factory
()¶
-
futures_factory
(futures_factory const &rhs)¶
-
futures_factory &
operator=
(futures_factory const &rhs)¶
-
futures_factory
(futures_factory &&rhs)¶
-
futures_factory &
operator=
(futures_factory &&rhs)¶
-
void
operator()
() const¶
-
threads::thread_id_ref_type
apply
(const char *annotation = "futures_factory::apply", launch policy = launch::async, error_code &ec = throws) const¶
-
threads::thread_id_ref_type
apply
(threads::thread_pool_base *pool, const char *annotation = "futures_factory::apply", launch policy = launch::async, error_code &ec = throws) const¶
-
hpx::future<Result>
get_future
(error_code &ec = throws)¶
-
constexpr bool
valid
() const¶
-
-
template<typename
-
namespace
-
namespace
-
namespace
hpx
-
template<typename
R
, typename ...Ts
>
classpackaged_task
<R(Ts...)>¶ Public Functions
-
packaged_task
()¶
-
template<typename
F
, typenameFD
= std::decay_t<F>, typenameEnable
= std::enable_if_t<!std::is_same_v<FD, packaged_task> && is_invocable_r_v<R, FD&, Ts...>>>packaged_task
(F &&f)¶
-
template<typename
Allocator
, typenameF
, typenameFD
= std::decay_t<F>, typenameEnable
= std::enable_if_t<!std::is_same_v<FD, packaged_task> && is_invocable_r_v<R, FD&, Ts...>>>packaged_task
(std::allocator_arg_t, Allocator const &a, F &&f)¶
-
packaged_task
(packaged_task const &rhs)¶
-
packaged_task
(packaged_task &&rhs)¶
-
packaged_task &
operator=
(packaged_task const &rhs)¶
-
packaged_task &
operator=
(packaged_task &&rhs)¶
-
void
swap
(packaged_task &rhs)¶
-
void
operator()
(Ts... ts)¶
-
hpx::future<R>
get_future
(error_code &ec = throws)¶
-
bool
valid
() const¶
-
void
reset
(error_code &ec = throws)¶
-
-
namespace
lcos
-
namespace
local
-
namespace
-
template<typename
-
namespace
std
-
namespace
hpx
-
-
template<typename
R
>
classpromise
: public hpx::detail::promise_base<R>¶ Public Functions
-
promise
()¶
-
~promise
()¶
-
promise &
operator=
(promise &&other)¶
-
void
swap
(promise &other)¶
-
void
set_value
(R const &r)¶
-
void
set_value
(R &&r)¶
Private Types
-
template<>
usingbase_type
= detail::promise_base<R>¶
-
-
template<typename
R
>
classpromise
<R&> : public hpx::detail::promise_base<R&>¶ Public Functions
-
promise
()
-
promise
(promise &&other)
-
~promise
()
-
promise &
operator=
(promise &&other)
-
void
swap
(promise &other)
-
void
set_value
(R &r)¶
Private Types
-
template<>
usingbase_type
= detail::promise_base<R&>¶
-
-
template<typename
-
namespace
hpx
-
namespace
traits
-
-
struct
acquire_future_disp
¶ Public Functions
-
template<typename
T
>
acquire_future_t<T>operator()
(T &&t) const¶
-
template<typename
-
struct
-
namespace
-
namespace
hpx
-
namespace
traits
Typedefs
Public Functions
-
namespace
-
template<typename
R
>
structfuture_access
<hpx::future<R>>¶ Public Static Functions
-
template<typename
Destination
>
static voidtransfer_result
(hpx::future<R> &&src, Destination &dest)¶
Private Static Functions
-
template<typename
Destination
>
static voidtransfer_result_impl
(hpx::future<R> &&src, Destination &dest, std::false_type)¶
-
template<typename
Destination
>
static voidtransfer_result_impl
(hpx::future<R> &&src, Destination &dest, std::true_type)¶
-
template<typename
Public Static Functions
Private Static Functions
-
namespace
hpx
-
namespace
traits
Typedefs
Variables
-
template<typename
R
>
structfuture_access
<hpx::future<R>> Public Static Functions
-
template<typename
SharedState
>
static hpx::future<R>create
(hpx::intrusive_ptr<SharedState> const &shared_state)
-
template<typename
T
= void>
static hpx::future<R>create
(detail::shared_state_ptr_for_t<hpx::future<hpx::future<R>>> const &shared_state)
-
template<typename
SharedState
>
static hpx::future<R>create
(hpx::intrusive_ptr<SharedState> &&shared_state)
-
template<typename
T
= void>
static hpx::future<R>create
(detail::shared_state_ptr_for_t<hpx::future<hpx::future<R>>> &&shared_state)
-
template<typename
SharedState
>
static hpx::future<R>create
(SharedState *shared_state, bool addref = true)
-
template<typename
Destination
>
static voidtransfer_result
(hpx::future<R> &&src, Destination &dest)
Private Static Functions
-
template<typename
Destination
>
static voidtransfer_result_impl
(hpx::future<R> &&src, Destination &dest, std::false_type)
-
template<typename
Destination
>
static voidtransfer_result_impl
(hpx::future<R> &&src, Destination &dest, std::true_type)
-
template<typename
-
template<typename
R
>
structfuture_access
<hpx::shared_future<R>> Public Static Functions
-
template<typename
SharedState
>
static hpx::shared_future<R>create
(hpx::intrusive_ptr<SharedState> const &shared_state)
-
template<typename
T
= void>
static hpx::shared_future<R>create
(detail::shared_state_ptr_for_t<hpx::shared_future<hpx::future<R>>> const &shared_state)
-
template<typename
SharedState
>
static hpx::shared_future<R>create
(hpx::intrusive_ptr<SharedState> &&shared_state)
-
template<typename
T
= void>
static hpx::shared_future<R>create
(detail::shared_state_ptr_for_t<hpx::shared_future<hpx::future<R>>> &&shared_state)
-
template<typename
SharedState
>
static hpx::shared_future<R>create
(SharedState *shared_state, bool addref = true)
-
static traits::detail::shared_state_ptr_t<R> const &
get_shared_state
(hpx::shared_future<R> const &f)
-
static traits::detail::shared_state_ptr_t<R>::element_type *
detach_shared_state
(hpx::shared_future<R> const &f)
-
template<typename
Destination
>
static voidtransfer_result
(hpx::shared_future<R> &&src, Destination &dest)
Private Static Functions
-
template<typename
Destination
>
static voidtransfer_result_impl
(hpx::shared_future<R> &&src, Destination &dest, std::false_type)
-
template<typename
Destination
>
static voidtransfer_result_impl
(hpx::shared_future<R> &&src, Destination &dest, std::true_type)
-
template<typename
-
template<typename
-
namespace
-
namespace
hpx
-
namespace
traits
-
namespace
Public Types
Public Types
-
namespace
hpx
-
namespace
traits
-
-
template<typename
R
>
structfuture_traits
<hpx::future<R>> Public Types
-
template<>
usingtype
= R
-
template<>
usingresult_type
= R
-
template<>
-
template<typename
R
>
structfuture_traits
<hpx::shared_future<R>> Public Types
-
template<>
usingtype
= R
-
template<>
usingresult_type
= R const&
-
template<>
-
template<>
structfuture_traits
<hpx::shared_future<void>> Public Types
-
template<>
usingtype
= void
-
template<>
usingresult_type
= void
-
template<>
-
template<typename
-
namespace
-
namespace
hpx
-
namespace
hpx
-
namespace
traits
Variables
-
namespace
-
namespace
hpx
-
namespace
traits
Typedefs
Variables
-
namespace
-
template<>
structpromise_local_result
<util::unused_type>¶ Public Types
-
template<>
usingtype
= void¶
-
template<>
-
namespace
hpx
-
namespace
traits
Typedefs
-
template<typename
Result
>
usingpromise_local_result_t
= typename promise_local_result<Result>::type¶
-
template<typename
Result
, typenameEnable
= void>
structpromise_local_result
¶ Public Types
-
template<>
usingtype
= Result¶
-
template<>
-
template<>
structpromise_local_result
<util::unused_type> Public Types
-
template<>
usingtype
= void
-
template<>
-
template<typename
-
namespace