Minimal implementation of a fully functional C++ thread pool
How to use:
#include <iostream>
#include "ThreadPool.hpp"
int main() {
// create thread pool
ThreadPool pool;
// get the number of threads
std::cout << "thread_number: " << pool.thread_count() << std::endl;
// get the number of tasks
std::cout << "task number: " << pool.task_count() << std::endl;
// submit Task
auto result = pool.submit([](int a, int b) { return a + b; }, 1, 2);
// get result from future
std::cout << result.get() << std::endl;
return 0;
}