When considering multithreaded techniques for an application, many developers assume that the only place where multithreaded techniques are valuable is in Windows Forms applications. In reality, the use of threading to increase performance and responsiveness is applicable to all kinds of applications, whether you're creating an ASP.NET application, a web service, a Windows Forms application, or even a Windows service. This chapter introduces you to the concepts and concerns related to programming in a multithreaded environment, and then gradually leads you on a tour of the various techniques involved in utilizing the .NET Framework's powerful multithreading systems to their fullest. Throughout this chapter you will see examples of where threads are useful, and how to work with them properly. The topic of multithreaded programming is long and often complex, and extremely hard to pack into a small chapter in a compendium book such as this. Using the guidelines in this chapter, you should be able to intelligently discuss the topic of multithreaded programming as well as put it into practice in any of the applications you write as you progress through this book. |