Can someone explain what is the reason for thread-pooling in Linux
, even if the threads are light to create and destroy??
1 Answer
Not as light as you think.
Thread pooling is orders of magnitudes lighter, so you can use pooled threads for gazillions of tiny tasks and still be efficient, while the same with freshly created threads would be inefficient.
In my environment, I can use five different threads in ten lines of code (without you even seeing that I'm using threads), which is possible because of highly efficient thread pooling).