.NET’s Thread Pool

In the case of threading, pools have been created to reuse operating system threads. This observation holds at different levels; the operating system itself has this notion for various of its components. Of more interest to us is the concept of the .NET thread pool.

Typical use of the thread pool is to deal with relatively short-lived work items that need to execute in the background. For example, suppose you got a user request on a web service coming in. On the Web, you shouldn’t be taking tens of seconds to provide a response for a web request. Users simply won’t buy it and will navigate away from your website. In other words, the logic to provide a response for the user’s request should be relatively short-lived. It should ...

Get C# 5.0 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.