Class ThreadController_NS::SimpleThreadController

template<typename FutureReturnType = void>
class SimpleThreadController

Subclassed by ThreadController_NS::SimpleRunningThreadController< FutureReturnType >

Public Functions

SimpleThreadController()
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
virtual int getRunningThreadCount() const
virtual void checkThreadsStatus()
template<typename FuncType, typename ...Args>
void startThread(FuncType &&func, Args&&... args)
virtual void finish()

Protected Functions

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)

Private Members

const int max_threads_
const FutureGetter<FutureReturnType> future_getter_ = {}
std::vector<std::future<FutureReturnType>> threads_