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$

1 Answer 1

1
$\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 and acknowledge that you have read and understand our privacy policy and code of conduct.

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