ThreadPool
ThreadPool copied to clipboard
std::result_of and std::result_of_t are deprecated in C++17. They are superseded by std::invoke_result and std::invoke_result_t
(1) (since C++14)
template< class T > using result_of_t = typename result_of<T>::type; //(deprecated in C++17)
(2) (since C++17) template< class F, class... ArgTypes> using invoke_result_t = typename invoke_result<F, ArgTypes...>::type;
ThreadPool fails to compile on clang16 w/ C++20 because of the use of std::result_of
Also conan center only has the 20140926
version.
This thread pool is a good example but it has limitations. I would suggest using improved ThreadPool that was based on this example implementation that we us in log4cplus: log4cplus/ThreadPool