December 2004
Intermediate to advanced
1008 pages
21h 40m
English
Many applications spend a lot of time doing nothing. Nothing, that is, except waiting for some kind of events or special circumstances to occur. After these events or circumstances have occurred, the application awakens, processes the events and then goes back to sleep. To make these tasks more efficient, .NET uses a thread pool. The following section explores the ThreadPool class and how to use it.
Similar to the ThreadStart delegate, WaitCallback is a wrapper around the program code that is to be executed by a thread pool:
WaitCallback workerThreadCallback = new WaitCallback(ThreadPoolWorkerThreadMethod);
Unlike the ThreadStart delegate, the WaitCallback ...
Read now
Unlock full access