hpx::experimental::task_group
hpx::experimental::task_group#
Defined in header hpx/experimental/task_group.hpp.
See Public API for a list of names and headers that are part of the public HPX API.
-
namespace hpx
-
namespace execution#
-
namespace experimental#
Typedefs
-
using instead = hpx::experimental::task_group#
-
using instead = hpx::experimental::task_group#
-
namespace experimental#
-
namespace experimental
Top-level namespace.
-
class task_group#
- #include <task_group.hpp>
A
task_group
represents concurrent execution of a group of tasks. Tasks can be dynamically added to the group while it is executing.Public Functions
-
task_group()#
-
~task_group()#
-
task_group(task_group const&) = delete#
-
task_group(task_group&&) = delete#
-
task_group &operator=(task_group const&) = delete#
-
task_group &operator=(task_group&&) = delete#
-
template<typename Executor, typename F, typename ...Ts>
inline void run(Executor &&exec, F &&f, Ts&&... ts)# Adds a task to compute
f()
and returns immediately.- Template Parameters
Executor – The type of the executor to associate with this execution policy.
F – The type of the user defined function to invoke.
Ts – The type of additional arguments used to invoke
f()
.
- Parameters
exec – The executor to use for the execution of the parallel algorithm the returned execution policy is used with.
f – The user defined function to invoke inside the task group.
ts – Additional arguments to use to invoke
f()
.
-
template<typename F, typename ...Ts>
inline void run(F &&f, Ts&&... ts)# Adds a task to compute
f()
and returns immediately.- Template Parameters
F – The type of the user defined function to invoke.
Ts – The type of additional arguments used to invoke
f()
.
- Parameters
f – The user defined function to invoke inside the task group.
ts – Additional arguments to use to invoke
f()
.
-
void wait()#
Waits for all tasks in the group to complete or be cancelled.
-
void add_exception(std::exception_ptr p)#
Adds an exception to this
task_group
.
Private Types
Private Functions
-
void serialize(serialization::output_archive&, unsigned const)#
Private Static Functions
-
static inline constexpr void serialize(serialization::input_archive&, unsigned const) noexcept#
Friends
- friend class serialization::access
-
task_group()#
-
class task_group#
-
namespace execution#