A small library to manage small helper threads.
if(!ThreadPool::isCreated());
ThreadPool::createInstance();
auto res = ThreadPool::getInstance().add([]()
{
return 40 + 2;
});
std::println("Result is {}", res.get());You can change the amount of threads
ThreadPool::createInstance(64);