0
$\begingroup$

Can someone explain what is the reason for thread-pooling in Linux, even if the threads are light to create and destroy??

$\endgroup$
0
$\begingroup$

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).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.