OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ThreadController_NS::SimpleRunningThreadController< FutureReturnType > Class Template Reference

#include <ThreadController.h>

+ Inheritance diagram for ThreadController_NS::SimpleRunningThreadController< FutureReturnType >:
+ Collaboration diagram for ThreadController_NS::SimpleRunningThreadController< FutureReturnType >:

Public Member Functions

 SimpleRunningThreadController ()=delete
 
template<bool future_return_void = std::is_void<FutureReturnType>::value>
 SimpleRunningThreadController (const int max_threads, std::enable_if_t< future_return_void > *=0)
 
template<bool future_return_void = std::is_void<FutureReturnType>::value>
 SimpleRunningThreadController (const int max_threads, const FutureGetter< FutureReturnType > future_getter, std::enable_if_t<!future_return_void > *=0)
 
 ~SimpleRunningThreadController () override
 
int notify_thread_is_completed ()
 
int getRunningThreadCount () const override
 
void checkThreadsStatus () override
 
template<typename FuncType , typename... Args>
int startThread (FuncType &&func, Args &&...args)
 
- Public Member Functions inherited from ThreadController_NS::SimpleThreadController< FutureReturnType >
 SimpleThreadController ()=delete
 
template<bool future_return_void = std::is_void<FutureReturnType>::value>
 SimpleThreadController (const int max_threads, std::enable_if_t< future_return_void > *=0)
 
template<bool future_return_void = std::is_void<FutureReturnType>::value>
 SimpleThreadController (const int max_threads, const FutureGetter< FutureReturnType > future_getter, std::enable_if_t<!future_return_void > *=0)
 
virtual ~SimpleThreadController ()
 
virtual int getThreadCount () const
 
template<typename FuncType , typename... Args>
void startThread (FuncType &&func, Args &&...args)
 
virtual void finish ()
 

Private Attributes

std::atomic< int > n_running_threads_
 

Additional Inherited Members

- Protected Member Functions inherited from ThreadController_NS::SimpleThreadController< FutureReturnType >
template<bool future_return_void = std::is_void<FutureReturnType>::value>
void get_future (std::future< FutureReturnType > &future, std::enable_if_t< future_return_void > *=0)
 
template<bool future_return_void = std::is_void<FutureReturnType>::value>
void get_future (std::future< FutureReturnType > &future, std::enable_if_t<!future_return_void > *=0)
 

Detailed Description

template<typename FutureReturnType = void>
class ThreadController_NS::SimpleRunningThreadController< FutureReturnType >

Definition at line 100 of file ThreadController.h.

Constructor & Destructor Documentation

template<typename FutureReturnType = void>
ThreadController_NS::SimpleRunningThreadController< FutureReturnType >::SimpleRunningThreadController ( )
delete
template<typename FutureReturnType = void>
template<bool future_return_void = std::is_void<FutureReturnType>::value>
ThreadController_NS::SimpleRunningThreadController< FutureReturnType >::SimpleRunningThreadController ( const int  max_threads,
std::enable_if_t< future_return_void > *  = 0 
)
inline

Definition at line 104 of file ThreadController.h.

106  : SimpleThreadController<FutureReturnType>(max_threads), n_running_threads_(0) {}
template<typename FutureReturnType = void>
template<bool future_return_void = std::is_void<FutureReturnType>::value>
ThreadController_NS::SimpleRunningThreadController< FutureReturnType >::SimpleRunningThreadController ( const int  max_threads,
const FutureGetter< FutureReturnType >  future_getter,
std::enable_if_t<!future_return_void > *  = 0 
)
inline

Definition at line 108 of file ThreadController.h.

111  : SimpleThreadController<FutureReturnType>(max_threads, future_getter)
112  , n_running_threads_(0) {}
template<typename FutureReturnType = void>
ThreadController_NS::SimpleRunningThreadController< FutureReturnType >::~SimpleRunningThreadController ( )
inlineoverride

Definition at line 113 of file ThreadController.h.

113 {}

Member Function Documentation

template<typename FutureReturnType = void>
void ThreadController_NS::SimpleRunningThreadController< FutureReturnType >::checkThreadsStatus ( )
inlineoverridevirtual

Reimplemented from ThreadController_NS::SimpleThreadController< FutureReturnType >.

Definition at line 116 of file ThreadController.h.

References ThreadController_NS::SimpleThreadController< FutureReturnType >::checkThreadsStatus().

+ Here is the call graph for this function:

template<typename FutureReturnType = void>
int ThreadController_NS::SimpleRunningThreadController< FutureReturnType >::getRunningThreadCount ( ) const
inlineoverridevirtual
template<typename FutureReturnType = void>
int ThreadController_NS::SimpleRunningThreadController< FutureReturnType >::notify_thread_is_completed ( )
inline

Definition at line 114 of file ThreadController.h.

template<typename FutureReturnType = void>
template<typename FuncType , typename... Args>
int ThreadController_NS::SimpleRunningThreadController< FutureReturnType >::startThread ( FuncType &&  func,
Args &&...  args 
)
inline

Definition at line 120 of file ThreadController.h.

References run_benchmark_import::args, and ThreadController_NS::SimpleThreadController< FutureReturnType >::startThread().

+ Here is the call graph for this function:

Member Data Documentation

template<typename FutureReturnType = void>
std::atomic<int> ThreadController_NS::SimpleRunningThreadController< FutureReturnType >::n_running_threads_
private

Definition at line 128 of file ThreadController.h.


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