mcx::container::ThreadPool
less than a minute
mcx::container::ThreadPool
Public Functions
Name | |
---|---|
ThreadPool(size_t thread_count =std::thread::hardware_concurrency()) | |
~ThreadPool() | |
bool | setName(std::string name) |
std::string | getName() const |
bool | setTaskSched(TaskSched task_sched, int task_prio =0) |
std::tuple< TaskSched, int > | getTaskSched() const |
bool | setCpuAffinity(const std::vector< uint32_t > & cpu_affinity_list) |
std::vector< uint32_t > | getCpuAffinity() const |
template <typename FunctionType > std::future< typename std::result_of< FunctionType()>::type > |
submit(FunctionType f) |
bool | empty() const |
Public Functions Documentation
function ThreadPool
explicit ThreadPool(
size_t thread_count =std::thread::hardware_concurrency()
)
function ~ThreadPool
~ThreadPool()
function setName
bool setName(
std::string name
)
function getName
std::string getName() const
function setTaskSched
bool setTaskSched(
TaskSched task_sched,
int task_prio =0
)
function getTaskSched
std::tuple< TaskSched, int > getTaskSched() const
function setCpuAffinity
bool setCpuAffinity(
const std::vector< uint32_t > & cpu_affinity_list
)
function getCpuAffinity
std::vector< uint32_t > getCpuAffinity() const
function submit
template <typename FunctionType >
inline std::future< typename std::result_of< FunctionType()>::type > submit(
FunctionType f
)
function empty
bool empty() const
Updated on 2022-04-05 at 16:21:26 +0200