Summary
This chapter introduced the System. Threading namespace and examined the Thread class in detail. We also discussed some basic ideas to help you hone your decision-making skills when it comes to multithreading your applications. You must always keep in mind the fact that threads require resources. Before you consume those resources, analyze the effect their use will have on the system and how you can minimize that overhead. You should consider creating a thread if you are accessing outside resources such as a network share or remote databases. You should also consider spawning a new thread when you plan to execute a lengthy process such as printing, I/O operations, and background data processing.
Whatever your situation, keep the number of your threads to aminimum. You’ll reduce the overhead on your processor, increase the amount of time that your time slice uses to process instructions within your thread, and reduce the amount of memory required by your application.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Rights and permissions
Copyright information
© 2005 Tobin Titus, Syed Fahad Gilani, Mike Gillespie, James Hart, Benny K. Mathew, Andy Olsen, David Curran, Jon Pinnock, Robin Pars, Fabio Claudio Ferracchiati, Sandra Gopikrishna, Tejaswi Redkar, Srinivasa Sivakumar
About this chapter
Cite this chapter
(2005). Threading in .NET. In: Pro .NET 1.1 Remoting, Reflection, and Threading. Apress. https://doi.org/10.1007/978-1-4302-0025-3_14
Download citation
DOI: https://doi.org/10.1007/978-1-4302-0025-3_14
Publisher Name: Apress
Print ISBN: 978-1-59059-452-0
Online ISBN: 978-1-4302-0025-3
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)