ThreadPool

ThreadPool is an interesting concept and entirely different from the earlier approach. In fact, a collection of threads is created based on the system resources (like memory) availability. By default, the thread pool has 25 threads per processor.

On demand, thread pool size can be scaled up and down to match the code execution.  Every thread of ThreadPool is always associated with a specific given task. On completion, the underlying thread will return to the pool manager for further assignments. It has been depicted in the following diagram:

In terms of implementation, the System.Threading.ThreadPool class handles the creation of ...

Get Enterprise Application Architecture with .NET Core 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.