Creating a thread pool

In this recipe, we will be looking at thread pools in C#. Basically, a thread pool is a collection of threads that can be used to perform tasks in the background. Once a thread completes its task, then it is sent to a pool of waiting threads, where it can be reused. Let's create a .NET Standard 2.0 library that uses thread pools.

Get .NET Standard 2.0 Cookbook 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.