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

Time for action - Understanding asynchronous execution step-by-step

We are going to run our last example step-by-step in order to understand the asynchronous execution, and how the main thread's code goes on running:

  1. Open the project, CodeBreakerApplication.
  2. Define a breakpoint in the line bakCodebreaker.RunWorkerAsync(); in butStart Click event code.
  3. Define a breakpoint in the line showFishes(); in the butHide Click event code.
  4. Press F5 or select Debug | Start Debugging in the main menu.
  5. Click on the Start button. The line with the breakpoint defined is shown highlighted as the next statement that will be executed.
  6. Press F10 or select Debug | Step Over in the main menu a few times. As you can see, the next statement that will be executed in the main ...

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