Chapter 3

Threading and the Asynchronous Pattern

 

 

 

 

 

COMPLETED PROJECT DOWNLOAD

Pre-requirement for codes compilation:

  1. Windows XP Pro SP2.

  2. Visual Studio 2008 Express Edition – free.

  3. Visual Studio Component Express Edition – VB .NET, C#, VC++ etc. - free.

  4. .NET Framework 3.5.

  5. Some of the program examples in this chapter are Windows Form/WinForm applications in C++/CLI, C# and VB .NET.

  6. Before you start this Chapter, you may want to learn and understand the Win32 Thread, Process and Synchronization that implemented on the Windows platform.

  7. The general Visual C++ .NET/C++-CLI programming tutorial which includes WinForm can be found at Visual C++ .NET programming tutorial.

 

What do we have in this chapter?

  1. An Overview

  2. Threading

  3. Creating a Thread

  4. C++ Thread Program Example

  5. C# Thread Program Example

  6. VB .NET Thread Program Example

  7. Controlling a Thread

  8. Abort()

  9. Suspend(), Interrupt(), and Resume()

  10. Finishing a Thread

  11. Windows Forms I/O Problem Using Threading

  12. C++ WinForm Program Example

  13. C# WinForm Program Example

  14. VB .NET WinForm Program Example

  15. Using Thread Pools

  16. Using Events to Synchronize Threads

  17. Designing Critical Sections in Your Code

  18. Monitor

  19. Interlocked

  20. C++ Critical Section Program Example

  21. C# Critical Section Program Example

  22. VB .NET Critical Section Program Example

  23. Asynchronous Pattern

  24. C++ Asynchronous I/O Program Example

  25. C# Asynchronous I/O Program Example

  26. VB .NET Asynchronous I/O Program Example

  27. C++ Thread and Network I/O Program Example

  28. C# Thread and Network I/O Program Example

  29. VB .NET Thread and Network I/O Program Example

 

 

 

Summary

 

This chapter will introduce two important concepts useful in network programming: threading and the asynchronous pattern. These asynchronous programming techniques allow you to design more flexible applications so that you can do multiple things at the same time in one application. This flexibility is important because you can develop a networking application that can service a user interface while it processes I/O on a network, which makes the user experience much better. Many of the remaining chapter discussions and samples will use these asynchronous programming techniques.

 

 

 

 

 

HOME

 

 
Custom Search
< Managed I/O: Streams, Readers, and Writers | Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7 | Part 8 | Part 9 | Part 10 | Serialization >