Is there a particular reason why one should prefer std::async or std::thread over a thread pool?
Basically async is a std::thread with a result and a launch policy, which means the performance of an async will lay behind the pool anyway since thread creation is really expensive.
Now I am curious if there is a reason why I should use async instead of a pool if I am launching tasks very frequently? For long running tasks I definitly see the advantage but for small tasks I can't see any benefit of asyncs at all.
Even for larger tasks I would more likely use a larger thread pool and accept that 1 or 2 threads are busy for a fixed amount of time since I like to have all my threads in one point.
I don't understand in general why there isn't a std::thread_pool implementation out there since I see not much reasons why I should launch threads (with async ot std::thread) during runtime if I can avoid it at all due to the costs of spawning new threads. Can anyone give me a valid reason why I should use asyncs or why there is no thread pool in the standard?