Objective 1.2: Manage multithreading
Although multithreading can give you a lot of advantages, it’s not easy to write a multithreaded application. Problems can happen when different threads access some shared data. What should happen when both try to change something at the same time? To make this work successfully, synchronizing resources is important.
Synchronizing resources
As you have seen, with the TPL support in .NET, it’s quite easy to create a multithreaded application. But when you build real-world applications with multithreading, you run into problems when you want to access the same data from multiple threads simultaneously. Example 1-35 shows an example of ...
Get Exam Ref 70-483: Programming in C# now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.