Fri, August 22, 2008, 07:26 PM under ParallelComputing
New C# Console Project in VS20082.
Add Reference to
(from Parallel Extensions June CTP
Replace the entire contents of
with the following (overly simplified extract of a more complex piece of code):
static class Program
static void Main()
Task t1 = Task.Create(delegate
Task t2 = Task.Create( // breakpoint #1
Console.WriteLine(o.ToString()) // breakpoint #2
t2.Wait(); // breakpoint #3
t1.Wait(); // breakpoint #4
Console.ReadLine(); // breakpoint #5
Insert a breakpoint (F9) wherever there is a comment.Questions:A.
Without running the project, what can you predict about which breakpoints will be hit and in what order?B.
Can you predict at each breakpoint, which of the two variables (
) is in scope (e.g. if they were in the Watch window)?