This chapter looks at the support that C# and the .NET base classes offer for developing applications that employ the use of multiple threads. It briefly examines the Thread and the ThreadPool classes, through which much of the threading support takes place, and you develop a couple of examples that illustrate threading principles. Then you examine some of the issues that arise with thread synchronization. Due to the complexity of the subject, the emphasis of this chapter is solely on understanding some of the basic principles involved through some simple sample applications. This chapter focuses on
How to start a thread
Providing thread priorities
Controlling access to objects through synchronization
By the end of the chapter, you will feel quite comfortable working with threads in your code. The following section starts by running through the basics of threading.