hpx/threading_base/thread_pool_base.hpp
hpx/threading_base/thread_pool_base.hpp#
Defined in header hpx/threading_base/thread_pool_base.hpp.
See Public API for a list of names and headers that are part of the public HPX API.
-
namespace hpx
-
namespace threads
Functions
-
std::ostream &operator<<(std::ostream &os, thread_pool_base const &thread_pool)#
-
class thread_pool_base#
- #include <thread_pool_base.hpp>
The base class used to manage a pool of OS threads.
Public Functions
-
virtual void suspend_processing_unit_direct(std::size_t virt_core, error_code &ec = throws) = 0#
Suspends the given processing unit. Blocks until the processing unit has been suspended.
- Parameters
virt_core – [in] The processing unit on the the pool to be suspended. The processing units are indexed starting from 0.
ec – [in,out] this represents the error status on exit, if this is pre-initialized to hpx::throws the function will throw on error instead.
-
virtual void resume_processing_unit_direct(std::size_t virt_core, error_code &ec = throws) = 0#
Resumes the given processing unit. Blocks until the processing unit has been resumed.
- Parameters
virt_core – [in] The processing unit on the the pool to be resumed. The processing units are indexed starting from 0.
ec – [in,out] this represents the error status on exit, if this is pre-initialized to hpx::throws the function will throw on error instead.
-
virtual void resume_direct(error_code &ec = throws) = 0#
Resumes the thread pool. Blocks until all OS threads on the thread pool have been resumed.
- Parameters
ec – [in,out] this represents the error status on exit, if this is pre-initialized to hpx::throws the function will throw on error instead.
-
virtual void suspend_direct(error_code &ec = throws) = 0#
Suspends the thread pool. Blocks until all OS threads on the thread pool have been suspended.
Note
A thread pool cannot be suspended from an HPX thread running on the pool itself.
-
virtual void suspend_processing_unit_direct(std::size_t virt_core, error_code &ec = throws) = 0#
-
struct thread_pool_init_parameters#
Public Functions
-
inline thread_pool_init_parameters(std::string const &name, std::size_t index, policies::scheduler_mode mode, std::size_t num_threads, std::size_t thread_offset, hpx::threads::policies::callback_notifier ¬ifier, hpx::threads::policies::detail::affinity_data const &affinity_data, hpx::threads::detail::network_background_callback_type const &network_background_callback = hpx::threads::detail::network_background_callback_type(), std::size_t max_background_threads = static_cast<std::size_t>(-1), std::size_t max_idle_loop_count = HPX_IDLE_LOOP_COUNT_MAX, std::size_t max_busy_loop_count = HPX_BUSY_LOOP_COUNT_MAX, std::size_t shutdown_check_count = 10)#
Public Members
-
inline thread_pool_init_parameters(std::string const &name, std::size_t index, policies::scheduler_mode mode, std::size_t num_threads, std::size_t thread_offset, hpx::threads::policies::callback_notifier ¬ifier, hpx::threads::policies::detail::affinity_data const &affinity_data, hpx::threads::detail::network_background_callback_type const &network_background_callback = hpx::threads::detail::network_background_callback_type(), std::size_t max_background_threads = static_cast<std::size_t>(-1), std::size_t max_idle_loop_count = HPX_IDLE_LOOP_COUNT_MAX, std::size_t max_busy_loop_count = HPX_BUSY_LOOP_COUNT_MAX, std::size_t shutdown_check_count = 10)#
-
std::ostream &operator<<(std::ostream &os, thread_pool_base const &thread_pool)#
-
namespace threads