flexiblesusy::Thread_pool Class Reference A pool of threads. More...
Collaboration diagram for flexiblesusy::Thread_pool:
![]()
Detailed DescriptionA pool of threads. Thread_pool represents a collection of threads. Tasks (callables) can be added to an internal queue. The tasks will be executed as soon as there is an idle thread. The destructor of the Thread_pool will wait until all tasks are finished and the queue is empty.
Definition at line 47 of file thread_pool.hpp. Constructor & Destructor Documentation◆ Thread_pool() [1/3]
Definition at line 49 of file thread_pool.hpp. References threads, and VERBOSE_MSG. ◆ Thread_pool() [2/3]
◆ Thread_pool() [3/3]
◆ ~Thread_pool()
waits for all tasks to finish and closes threads Definition at line 78 of file thread_pool.hpp. Member Function Documentation◆ operator=() [1/2]
◆ operator=() [2/2]
◆ run_packaged_task()
template<typename Task >
runs task and returns future Definition at line 97 of file thread_pool.hpp. ◆ run_task()
template<typename Task >
runs task Definition at line 120 of file thread_pool.hpp. ◆ size()
Definition at line 133 of file thread_pool.hpp. Member Data Documentation◆ condition
Definition at line 139 of file thread_pool.hpp. ◆ mutex
Definition at line 138 of file thread_pool.hpp. ◆ stop
Definition at line 140 of file thread_pool.hpp. ◆ tasks
Definition at line 137 of file thread_pool.hpp. ◆ threads
Definition at line 136 of file thread_pool.hpp. Referenced by Thread_pool(). The documentation for this class was generated from the following file: Generated on Sun Apr 6 2025 11:10:38 for FlexibleSUSY by |