Furrent
Public Member Functions | List of all members
fur::mt::ThreadGroup< State > Class Template Reference

Manages the execution of a group of threads. More...

#include <group.hpp>

Public Member Functions

 ThreadGroup ()
 Create disabled thread group. More...
 
virtual ~ThreadGroup ()
 Stops and joins all threads. More...
 
 ThreadGroup (ThreadGroup &)=delete
 
ThreadGroupoperator= (ThreadGroup &)=delete
 
 ThreadGroup (ThreadGroup &&) noexcept=delete
 
ThreadGroupoperator= (ThreadGroup &&) noexcept=delete
 
void launch (ThreadFn fn, int64_t max_worker_threads=0)
 Create threads and begin execution. More...
 
void terminate ()
 Terminate thread execution, this operation is irrecuperable. More...
 
std::vector< State > & get_states ()
 Obtain threads state. More...
 
int64_t get_worker_count () const
 Get total number of workers. More...
 

Detailed Description

template<typename State>
class fur::mt::ThreadGroup< State >

Manages the execution of a group of threads.

Constructor & Destructor Documentation

◆ ThreadGroup() [1/3]

template<typename State >
fur::mt::ThreadGroup< State >::ThreadGroup

Create disabled thread group.

◆ ~ThreadGroup()

template<typename State >
fur::mt::ThreadGroup< State >::~ThreadGroup
virtual

Stops and joins all threads.

◆ ThreadGroup() [2/3]

template<typename State >
fur::mt::ThreadGroup< State >::ThreadGroup ( ThreadGroup< State > &  )
delete

◆ ThreadGroup() [3/3]

template<typename State >
fur::mt::ThreadGroup< State >::ThreadGroup ( ThreadGroup< State > &&  )
deletenoexcept

Member Function Documentation

◆ get_states()

template<typename State >
std::vector< State > & fur::mt::ThreadGroup< State >::get_states

Obtain threads state.

◆ get_worker_count()

template<typename State >
int64_t fur::mt::ThreadGroup< State >::get_worker_count

Get total number of workers.

◆ launch()

template<typename State >
void fur::mt::ThreadGroup< State >::launch ( ThreadFn  fn,
int64_t  max_worker_threads = 0 
)

Create threads and begin execution.

◆ operator=() [1/2]

template<typename State >
ThreadGroup& fur::mt::ThreadGroup< State >::operator= ( ThreadGroup< State > &&  )
deletenoexcept

◆ operator=() [2/2]

template<typename State >
ThreadGroup& fur::mt::ThreadGroup< State >::operator= ( ThreadGroup< State > &  )
delete

◆ terminate()

template<typename State >
void fur::mt::ThreadGroup< State >::terminate

Terminate thread execution, this operation is irrecuperable.


The documentation for this class was generated from the following files: