Summary

 < Day Day Up > 



In this chapter, we have seen how thread pooling can be used when a thread is required for a relatively short duration. Thread pooling allows recycling of threads. A thread is assigned a task and, when that task has completed, it returns to the pool and waits for the next assignment. We also covered the various aspects of using thread pools in .NET applications. We started defining what a thread pool is and then why we might choose to use one in our applications. We also covered the role of CLR in creating the thread pool followed by the glitches involved in using a thread pool.

We later covered some more scalability issues, as the ThreadPool class isn't suitable for applications that may need to fire a number of long-lived threads. We discussed the creation of a ThreadPool manager class and mentioned how SMP systems can dramatically increase the performance of an application if it is threaded.



 < Day Day Up > 



C# Threading Handbook
C# Threading Handbook
ISBN: 1861008295
EAN: 2147483647
Year: 2003
Pages: 74

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net