CARLA
Public Member Functions | Private Attributes | List of all members
carla::ThreadGroup Class Reference

#include <ThreadGroup.h>

+ Inheritance diagram for carla::ThreadGroup:
+ Collaboration diagram for carla::ThreadGroup:

Public Member Functions

template<typename F >
void CreateThread (F &&functor)
 
template<typename F >
void CreateThreads (size_t count, F functor)
 
void JoinAll ()
 
 ThreadGroup ()=default
 
 ~ThreadGroup ()
 

Private Attributes

std::vector< std::thread > _threads
 

Additional Inherited Members

- Private Member Functions inherited from carla::NonCopyable
 NonCopyable ()=default
 
 NonCopyable (const NonCopyable &)=delete
 
 NonCopyable (NonCopyable &&)=delete
 
NonCopyableoperator= (const NonCopyable &)=delete
 
NonCopyableoperator= (NonCopyable &&)=delete
 

Detailed Description

Definition at line 17 of file ThreadGroup.h.

Constructor & Destructor Documentation

◆ ThreadGroup()

carla::ThreadGroup::ThreadGroup ( )
default

◆ ~ThreadGroup()

carla::ThreadGroup::~ThreadGroup ( )
inline

Definition at line 22 of file ThreadGroup.h.

References JoinAll().

+ Here is the call graph for this function:

Member Function Documentation

◆ CreateThread()

template<typename F >
void carla::ThreadGroup::CreateThread ( F &&  functor)
inline

Definition at line 27 of file ThreadGroup.h.

References _threads.

Referenced by CreateThreads(), and TEST().

+ Here is the caller graph for this function:

◆ CreateThreads()

template<typename F >
void carla::ThreadGroup::CreateThreads ( size_t  count,
functor 
)
inline

Definition at line 32 of file ThreadGroup.h.

References _threads, and CreateThread().

Referenced by carla::ThreadPool::AsyncRun(), and TEST().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JoinAll()

void carla::ThreadGroup::JoinAll ( )
inline

Definition at line 39 of file ThreadGroup.h.

References _threads, and DEBUG_ASSERT_NE.

Referenced by carla::ThreadPool::Stop(), TEST(), and ~ThreadGroup().

+ Here is the caller graph for this function:

Member Data Documentation

◆ _threads

std::vector<std::thread> carla::ThreadGroup::_threads
private

Definition at line 51 of file ThreadGroup.h.

Referenced by CreateThread(), CreateThreads(), and JoinAll().


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