In Brief

In this chapter, we took a look at multithreading and remoting. Here's an overview of the topics:

  • Multithreading is all about hosting multiple threads in addition to an application's main thread, and using them as multiple streams of execution. You can create new threads with the Thread class. This class has various methods you can use to control threads: Start, Suspend, Resume, Sleep, Join, Abort, and so on.

  • You can give a thread its own code by placing that code in a method, which you pass to the Thread constructor. Do not handle user interface elements like forms or controls in any thread but the main one.

  • You can synchronize threads with lock and Monitor statements, avoiding conflict when threads use shared resources.

  • Remoting is the ...

Get Microsoft® Visual C#® .NET 2003 Kick Start now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.