hpx::execution::experimental::get_parallel_scheduler#
Defined in header hpx/execution.hpp.
See Public API for a list of names and headers that are part of the public HPX API.
See also:
-
parallel_scheduler hpx::execution::experimental::get_parallel_scheduler()#
Return a parallel_scheduler that schedules on the default HPX thread pool.
This is HPX’s implementation of the P2079
std::execution::get_parallel_scheduler()entry point. Work started on the returned scheduler uses the same worker threads as the default pool rather than a separate system thread pool.Note
For a named resource-partitioner pool, use the overload that takes
hpx::threads::thread_pool_base&.- Returns:
A scheduler bound to HPX’s default thread pool.
-
parallel_scheduler hpx::execution::experimental::get_parallel_scheduler(hpx::threads::thread_pool_base &pool)#
Return a parallel_scheduler that runs work on
pool.Look named pools up with
hpx::resource::get_thread_pool. A misspelled or unknown name throwshpx::exception; it does not produce undefined behavior.- Parameters:
pool – HPX thread pool that should execute scheduled work.
- Pre:
poolmust outlive the returned scheduler and every operation started on it. The scheduler stores a non-owning pointer; it does not extend the pool’s lifetime. This precondition is not enforced at runtime (caller responsibility). Debug builds assert thatpoolcurrently reports at least one OS thread.- Returns:
A scheduler bound to
pool.