O'Reilly logo

C# 7 and .NET Core Cookbook by Dirk Strauss

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

How to do it...

  1. Start debugging your multithreaded application after adding a break point somewhere in the code. You can access various debugging windows by going to Debug | Windows in Visual Studio:
  1. The first window available to you is the Threads window. Access it by going to Debug | Windows in Visual Studio or type Ctrl + D, T. In here, you can right-click on a thread to watch and flag it. If you have given your threads names, you will see those names appear in the Name column. To give your thread a name, modify the LockThreadExample() method created in an earlier recipe.
        public void LockThreadExample()        { Task thread1 = Task.Factory.StartNew(() ...

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