When to use thread pool in C#? [closed]

I would suggest you use a thread pool in C# for the same reasons as any other language.

When you want to limit the number of threads running or don’t want the overhead of creating and destroying them, use a thread pool.

By small tasks, the book you read means tasks with a short lifetime. If it takes ten seconds to create a thread which only runs for one second, that’s one place where you should be using pools (ignore my actual figures, it’s the ratio that counts).

Otherwise you spend the bulk of your time creating and destroying threads rather than simply doing the work they’re intended to do.

Leave a Comment