O'Reilly logo

C# 2008 and 2005 Threaded Programming: Beginner's Guide by Gastón C. Hillar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Avoiding locks and many synchronization nightmares

So far, we have been working with parallelized algorithms and we've used C# object-oriented capabilities to simplify the code and make it easier to understand. We have specialized classes using inheritance and many encapsulation techniques to simplify the parallel algorithm creation process. Hence, we avoided repeating the same code on every new application.

However, we have been avoiding some common nightmares related to multithreaded programming - locks and synchronization problems. How can we use C# and .NET capabilities to synchronize access to variables shared by several different threads?

The answer is very simple, avoiding locks and dodging synchronization problems. The best way to simplify ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required