hpx::packaged_task
hpx::packaged_task#
Defined in header hpx/future.hpp.
See Public API for a list of names and headers that are part of the public HPX API.
-
template<typename Sig, typename Allocator>
struct uses_allocator<hpx::packaged_task<Sig>, Allocator> : public true_type#
-
namespace hpx
Top level HPX namespace.
-
template<typename Sig>
class packaged_task# - #include <packaged_task.hpp>
The class template hpx::packaged_task wraps any Callable` target (function, lambda expression, bind expression, or another function object) so that it can be invoked asynchronously. Its return value or exception thrown is stored in a shared state which can be accessed through hpx::future objects. Just like hpx::function, hpx::packaged_task is a polymorphic, allocator-aware container: the stored callable target may be allocated on heap or with a provided allocator.
-
template<typename R, typename ...Ts>
class packaged_task<R(Ts...)># Public Functions
-
packaged_task() = default#
-
template<typename F, typename FD = std::decay_t<F>, typename Enable = std::enable_if_t<!std::is_same_v<FD, packaged_task> && is_invocable_r_v<R, FD&, Ts...>>>
inline explicit packaged_task(F &&f)#
-
template<typename Allocator, typename F, typename FD = std::decay_t<F>, typename Enable = std::enable_if_t<!std::is_same_v<FD, packaged_task> && is_invocable_r_v<R, FD&, Ts...>>>
inline explicit packaged_task(std::allocator_arg_t, Allocator const &a, F &&f)#
-
packaged_task(packaged_task const &rhs) noexcept = delete#
-
packaged_task(packaged_task &&rhs) noexcept = default#
-
packaged_task &operator=(packaged_task const &rhs) noexcept = delete#
-
packaged_task &operator=(packaged_task &&rhs) noexcept = default#
-
inline void swap(packaged_task &rhs) noexcept#
-
inline bool valid() const noexcept#
-
inline void reset(error_code &ec = throws)#
Private Types
-
using function_type = hpx::move_only_function<R(Ts...)>#
-
packaged_task() = default#
-
namespace lcos
-
namespace local#
Typedefs
-
typedef hpx::packaged_task<Sig> instead#
-
typedef hpx::packaged_task<Sig> instead#
-
namespace local#
-
template<typename Sig>
-
namespace std
Functions
-
template<typename Sig>
void swap(hpx::packaged_task<Sig> &lhs, hpx::packaged_task<Sig> &rhs) noexcept#
- template<typename Sig, typename Allocator> packaged_task< Sig >, Allocator > : public true_type
-
template<typename Sig>