OmniSciDB
a5dc49c757
|
#include <ThreadController.h>
Public Member Functions | |
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 |
virtual int | getRunningThreadCount () const |
virtual void | checkThreadsStatus () |
template<typename FuncType , typename... Args> | |
void | startThread (FuncType &&func, Args &&...args) |
virtual void | finish () |
Protected Member 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 Attributes | |
const int | max_threads_ |
const FutureGetter < FutureReturnType > | future_getter_ {} |
std::vector< std::future < FutureReturnType > > | threads_ |
Definition at line 39 of file ThreadController.h.
|
delete |
|
inline |
Definition at line 43 of file ThreadController.h.
|
inline |
Definition at line 46 of file ThreadController.h.
|
inlinevirtual |
Definition at line 50 of file ThreadController.h.
|
inlinevirtual |
Reimplemented in ThreadController_NS::SimpleRunningThreadController< FutureReturnType >.
Definition at line 53 of file ThreadController.h.
References ThreadController_NS::SimpleThreadController< FutureReturnType >::get_future(), ThreadController_NS::SimpleThreadController< FutureReturnType >::getRunningThreadCount(), ThreadController_NS::SimpleThreadController< FutureReturnType >::max_threads_, and ThreadController_NS::SimpleThreadController< FutureReturnType >::threads_.
Referenced by ThreadController_NS::SimpleRunningThreadController< FutureReturnType >::checkThreadsStatus(), and anonymous_namespace{TableArchiver.cpp}::update_or_drop_column_ids_in_table_files().
|
inlinevirtual |
Definition at line 74 of file ThreadController.h.
References ThreadController_NS::SimpleThreadController< FutureReturnType >::get_future(), and ThreadController_NS::SimpleThreadController< FutureReturnType >::threads_.
Referenced by anonymous_namespace{TableArchiver.cpp}::update_or_drop_column_ids_in_table_files().
|
inlineprotected |
Definition at line 83 of file ThreadController.h.
Referenced by ThreadController_NS::SimpleThreadController< FutureReturnType >::checkThreadsStatus(), and ThreadController_NS::SimpleThreadController< FutureReturnType >::finish().
|
inlineprotected |
Definition at line 88 of file ThreadController.h.
References ThreadController_NS::SimpleThreadController< FutureReturnType >::future_getter_.
|
inlinevirtual |
Reimplemented in ThreadController_NS::SimpleRunningThreadController< FutureReturnType >.
Definition at line 52 of file ThreadController.h.
References ThreadController_NS::SimpleThreadController< FutureReturnType >::threads_.
Referenced by ThreadController_NS::SimpleThreadController< FutureReturnType >::checkThreadsStatus().
|
inlinevirtual |
Definition at line 51 of file ThreadController.h.
References ThreadController_NS::SimpleThreadController< FutureReturnType >::threads_.
|
inline |
Definition at line 71 of file ThreadController.h.
References run_benchmark_import::args, threading_serial::async(), and ThreadController_NS::SimpleThreadController< FutureReturnType >::threads_.
Referenced by ThreadController_NS::SimpleRunningThreadController< FutureReturnType >::startThread(), and anonymous_namespace{TableArchiver.cpp}::update_or_drop_column_ids_in_table_files().
|
private |
Definition at line 95 of file ThreadController.h.
Referenced by ThreadController_NS::SimpleThreadController< FutureReturnType >::get_future().
|
private |
Definition at line 94 of file ThreadController.h.
Referenced by ThreadController_NS::SimpleThreadController< FutureReturnType >::checkThreadsStatus().
|
private |
Definition at line 96 of file ThreadController.h.
Referenced by ThreadController_NS::SimpleThreadController< FutureReturnType >::checkThreadsStatus(), ThreadController_NS::SimpleThreadController< FutureReturnType >::finish(), ThreadController_NS::SimpleThreadController< FutureReturnType >::getRunningThreadCount(), ThreadController_NS::SimpleThreadController< FutureReturnType >::getThreadCount(), and ThreadController_NS::SimpleThreadController< FutureReturnType >::startThread().