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 books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.