IN THIS CHAPTER
In this chapter, we'll discuss how to leverage the Framework Class Library's support for threads. Due to the previous lack of support in Visual Basic for easily generating and managing threads, the topic of threading and multithreaded application design is not one that Visual Basic developers are typically familiar with. So, first on tap is a brief discussion of why you would want to develop multithreaded applications in the first place. Multithreaded applications are not a cure-all, but they are certainly one more tool that you can use to solve application design problems.
Then, we'll introduce some of the basic concepts of threading that will enable you to digest and understand how Microsoft has structured the threading classes in the .NET Framework. There is a very rich threading library exposed to you, and Visual Basic .NET also has some intrinsic language support for threads.
Finally, we will dive into programming with threads at both an introductory level and a more advanced level.
After reading this chapter, you should be able to:
Apply threading concepts in your application design
Create and use thread objects to execute code
Understand how and why threads transition from state to state
Discuss ways to prevent contention between threads
Store and retrieve data within a thread and across threads
3.149.250.88