August 2002
Intermediate to advanced
576 pages
13h 54m
English
Many threads spend most of their time waiting for user interaction, such as a user logging in, a key being pressed, or the availability of data on an I/O stream. In its ThreadPool class, .NET has provided an event-driven model that can replace these threads.
The .NET ThreadPool class has a fixed number of threads available for each processor—normally 50 (25 worker threads and 25 threads for asynchronous I/O). This number is fixed by the CLR and cannot be changed. This pool of threads can monitor several wait operations and notify a delegate when they become free.
The ThreadPool class can be used to offload an asynchronous task without using a thread directly. This is not as useful as it sounds since ...
Read now
Unlock full access