Skip to main content
  • 211 Accesses

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Hardcover Book
USD 54.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Rights and permissions

Reprints 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

Publish with us

Policies and ethics