.Net Multithreading

A Complete Guide with Examples in C# and VB.NET

  • Nombre de pages : 356 pages   drapeau anglais
  • Date de parution : 20/12/2002

Résumé

If you need high performance, or a rich user experience, you should consider multithreading. With .NET you can develop stable and robust multithreaded applications with minimal effort. .NET Multithreading teaches the basics in an understandable and practical way. It then focuses on .NET's mechanisms for multithreading and shows how easy it can be to develop applications with them. The book covers several design approaches such as one-thread-one-class, the asynchronous design pattern, and using queues as buffers between threads. It explains best practices and how to avoid common multithreading pitfalls such as deadlock and race conditions.

This book is written for intermediate .NET developers who know C# or VB .NET, but are not assumed to have a background in multithreading. It is rich in examples that will help you understand the subject and produce multithreaded applications that have the power of C++ while keeping the ease and reliability of .NET.

What's Inside:

  • Creating multithreaded System Services
  • Designing for high performance
  • Using Asynchronous Delegates
  • How to control thread execution
  • Handling and logging errors
  • How to protect data from corruption
  • How to coordinate threads
  • How to use ThreadPools effectively

Contents

Process and Thread basics
  • 1.1. What is a process, why do they exist?
  • 1.2. Multitasking
  • 1.3. How Preemptive Multitasking is Accomplished
  • 1.4. Summary
.NET from a Threading Perspective
  • 2.1. .NET Architecture Overview
  • 2.2. Garbage Collection
  • 2.3. Security
  • 2.4. Summary
Multithreading in .Net
  • 3.1. Application Domain
  • 3.2. Threads
  • 3.3. Summary
Thread Lifecycle
  • 4.1. Creating a new thread
  • 4.2. Starting a thread
  • 4.3. Ending a thread
  • 4.4. Determining a Thread's Status
  • 4.5. Summary
Controlling threads
  • 5.1. Example: Web Site Monitoring
  • 5.2. Naming Threads
  • 5.3. Using Sleep and Interrupt
  • 5.4. Using Background and Foreground Threads
  • 5.5. Using Suspend and Resume
  • 5.6. Exploring Thread States
  • 5.7. Digging Deeper into Thread Control
  • 5.8. Summary
Communicating with threads
  • 6.1. Using Data to Communicate
  • 6.2. When things go badly
  • 6.3. Summary
Concurrency Control
  • 7.1. Understanding Thread-Safety
  • 7.2. Atomic operations
  • 7.3. Lock and AsyncLock Statements
  • 7.4. The Monitor Class
  • 7.5. Digging Deeper into Concurrency Control
  • 7.6. Summary
Wait Handle Classes
  • 8.1. An Overview of the WaitHandle class
  • 8.2. AutoResetEvent:
  • 8.3. WaitHandle
  • 8.4. ManualResetEvent
  • 8.5. Mutex: WaitOne and ReleaseMutex
  • 8.6. Summary
Reader Writer Lock
  • 9.1. Reader Lock
  • 9.2. Writer Lock
  • 9.3. ReleaseLock and RestoreLock
  • 9.4. Summary
Thread Pool
  • 10.1. ThreadPool Class and QueueUserWorkItem
  • 10.2. RegisterWaitForSingleObject
  • 10.3. Informational Methods and Properties
  • 10.4. The UnsafeRegisterWaitForSingleObject and UnsafeQueueUserWorkItem Methods
  • 10.5. What ThreadPools are used for in .NET
  • 10.6. Summary
ThreadStatic and Thread Local Storage
  • 11.1. Using Thread Static Variables
  • 11.2. Using Unnamed Data Slots
  • 11.3. Using Named Data Slots
  • 11.4. Freeing Named Data Slots
  • 11.5. Summary
Delegates in Detail
  • 12.1. Delegates Revisited
  • 12.2. The ThreadStart Delegate
  • 12.3. Callbacks
  • 12.4. Handling Thread Exceptions in Windows Forms
  • 12.5. Asynchronous Delegates
  • 12.6. Creating and Invoking Dynamic Delegates
  • 12.7. Summary
Exceptions
  • 13.1. Exceptions Revisited
  • 13.2. Thread Related Exceptions
  • 13.3. The AppDomain UnhandledException Event
  • 13.4. Summary
Timers
  • 14.1. Using Windows Forms Timers
  • 14.2. System.Timers.Timer
  • 14.3. System.Threading.Timer
  • 14.4. Summary
Windows Forms from a Multithreading Perspective
  • 15.1. Windows Forms Multithreaded related issues
  • 15.2. Using the Graphics Object With Threads
  • 15.3. Thread Related Application Events and Properties
  • 15.4. Summary
Unmanaged Code and Managed Threads
  • 16.1. What exactly is an apartment?
  • 16.2. COM Interoperability
  • 16.3. Summary
Designing with Threads
  • 17.1. The Asynchronous Design Pattern
  • 17.2. MessageQueue Example
  • 17.3. One Class One Thread
  • 17.4. Performance issues
  • 17.5. Summary
Multithreading in J#

Caractéristiques

  • Parution : 20/12/2002
  • Edition : 1ère édition
  •  
  • Nb de pages : 356 pages
  • Format : 18,5 x 23,5
  • Couverture : Broché
  • Poids : 595 g
  • Intérieur : Noir et Blanc
  •  

mentions légales | conditions générales de vente | copyright © 2012
(1) livraison gratuite à partir de 49 € en France métropolitaine