Working with applications that create multiple threads is not a trivial matter. Being able to spot the places within your code where synchronization issues can occur can at times be quite difficult. Any time you create an application and create a new thread, you should immediately look for areas that might later lead into problems due to concurrent access. The .NET Framework has made creating, using, and synchronizing threads much easier than it was using the WIN32 API. However, it's still up to you as the developer to make sure you use those classes in a way that permits seamless concurrent execution of multiple threads without running the risk of data corruption.

This hour's lesson took you beyond the basic Hello World program and dealt more with the common consumer/producer designed program. By using this lesson as a model in the future, you'll be able to recognize potential hazards and have the knowledge and toolset available to eliminate them.


Sams Teach Yourself Visual C++. NET in 24 Hours
Sams Teach Yourself Visual C++.NET in 24 Hours
ISBN: 0672323230
EAN: 2147483647
Year: 2002
Pages: 237

Similar book on Amazon © 2008-2017.
If you may any questions please contact us: