OmniSciDB  04ee39c94c
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 99 of file ThreadController.h.

Constructor & Destructor Documentation

◆ SimpleRunningThreadController() [1/3]

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

◆ SimpleRunningThreadController() [2/3]

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 103 of file ThreadController.h.

105  : SimpleThreadController<FutureReturnType>(max_threads), n_running_threads_(0) {}

◆ SimpleRunningThreadController() [3/3]

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 107 of file ThreadController.h.

110  : SimpleThreadController<FutureReturnType>(max_threads, future_getter)
111  , n_running_threads_(0) {}

◆ ~SimpleRunningThreadController()

template<typename FutureReturnType = void>
ThreadController_NS::SimpleRunningThreadController< FutureReturnType >::~SimpleRunningThreadController ( )
inlineoverride

Definition at line 112 of file ThreadController.h.

112 {}

Member Function Documentation

◆ checkThreadsStatus()

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

Reimplemented from ThreadController_NS::SimpleThreadController< FutureReturnType >.

Definition at line 115 of file ThreadController.h.

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

+ Here is the call graph for this function:

◆ getRunningThreadCount()

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

◆ notify_thread_is_completed()

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

Definition at line 113 of file ThreadController.h.

◆ startThread()

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

Definition at line 119 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

◆ n_running_threads_

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

Definition at line 127 of file ThreadController.h.


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