7#ifndef __DETACHPOOL_IMPL_H__
8#define __DETACHPOOL_IMPL_H__
19template<
typename _Callable,
typename... _Args>
27 std::thread thrSimpleDetach(__f, std::ref(
p_listThreadInfo.back().exitStatus), __args...);
28 thrSimpleDetach.detach();
#define PEXIT_STATUS_NOT_FIHISHED
void addThread(const std::string &description, _Callable &&__f, _Args &&... __args)
Add the thread into the pool.
std::mutex p_mtx
Mutex to handle exit status of detached threads.
ListThreadDetachInfo p_listThreadInfo
List of the information related to all ongoing threads.
Information related to the current detached thread.
int exitStatus
Exit status of the current thread.
std::string description
Description of the current thread.