[ Back to Diary Page ]


General Meeting

Location: Auditorium, Library 2nd Floor
Date: Thursday, April 10, 2003
Time: 7:00 to 10:00 pm
Topic: Multi-threading and Asynchronous Processing in .NET
Peter Vogel, PH&V Information Services
www.phvis.com

With Visual Basic.NET it's easy to do two things at once in your application--which means it also easy to shoot yourself in the foot. The .NET framework makes it convenient to do something that only C programmers could do before: multi-threading. However, multi-threading actually slows your application down, so there are only a few scenarios when you should actually consider using this powerful tool. Even then, there are important design considerations that you must take into account if you don't want to end up introducing a whole new class of bugs into your application--bugs that will be very hard to track down.

In fact, you don't have to use multi-threading to get the benefits of multi-threading. The .NET Framework's support for threadpools and asynchronous processing will let you do two (or more) things at once. You give up some of the control that "pure" multi-threading gives you but get a whole lot of piece of mind. In fact many parts of the .NET Framework (including Web Services and File I/O) come with asynchronous processing built in.

In this session, Peter will show you how to recognize when multi-threading is the best solution for your problem and how to design your application to minimize the opportunities for bugs. You'll see how to implement multi-threading using both your own threads and the .NET threadpool. You'll also find out how to isolate your threads' activities to prevent conflicts. Then you'll see how asynchronous processing works, what you give up and what you'll gain. You'll see how to call Web Services and file I/O asynchronously and how to add asynchronous processing to your applications or object. In fact, you'll see how to call any method asynchronously.

About Peter Vogel
Peter Vogel (MBA, MCSD) is a principal in PH&V Information Services. PH&V specializes in system design and development for COM/COM+ based systems. Peter has designed, built, and installed intranet and component based systems for Bayer AG, Exxon, Christie Digital, and the Canadian Imperial Bank of Commerce. He is also the editor of the Smart Access and XML Developer newsletters, wrote The Visual Basic Object and Component Handbook (Prentice Hall), and is currently working on a book on User Interface Design (APress). Peter teaches for Learning Tree International, wrote their Web application development course, is technical editor on their COM+ course, and co-developed the Internet version of their Relational Database Design course. His articles have appeared in every major magazine devoted to VB based development and in the Microsoft Developer Network libraries. Peter also presents at conferences in North America and Europe.

Files: Powerpoint sides, white papers and sample code for MultiThreading in VB.NET (429 Kb)


[ Back to Diary Page ]