O'Reilly logo

Hands-On Design Patterns with C# and .NET Core by Jeffrey Chilberto, Gaurav Aroraa

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

Patterns and practices – TDD and Parallel LINQ

While we work with multithreading, we should follow best practices to write a smooth code. A smooth code is where a developer doesn't face deadlock. In other words, multithreading requires a lot of care during the writing process. 

While multiple threads are running in a class/program, deadlock occurs when each thread approaches the object or resource written under a lock statement. The actual deadlock occurs when each thread approaches to lock an object/resource that is already locked by another thread.

A small mistake can result in developers having to tackle unknown bugs that occur due to threads that are blocked. In addition to this, a bad implementation of a few words in the code can impact ...

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