Chapter 6. Threaded Clients (Responsive Interfaces)

Microsoft .NET brings multithreading to the masses with the new set of classes in the System.Threading namespace. These classes wrap the intricacies of the Microsoft Windows API and make creating new threads as easy as declaring an object and invoking a method. But even though it's easy to create threads with the .NET class library, it's not as easy to manage them properly (and safely). To use threading successfully, developers need to adopt a different frame of mind and a few new habits. Without these best practices, a multithreaded application can appear to work correctly in the development environment but develop subtle and difficult-to-diagnose errors when deployed in the real world. These errors can compromise performance or, at worst, cause the program to fail or record invalid data.

This chapter examines the threading essentials every .NET developer requires. These include considerations such as callbacks, locking, and synchronization. We'll start with the basic support for asynchronous calls that's built in to the .NET Framework and consider how it can be used with XML Web services and remote components. The second half of the chapter tackles custom threaded objects and synchronization.



Microsoft. NET Distributed Applications(c) Integrating XML Web Services and. NET Remoting
MicrosoftВ® .NET Distributed Applications: Integrating XML Web Services and .NET Remoting (Pro-Developer)
ISBN: 0735619336
EAN: 2147483647
Year: 2005
Pages: 174

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net