92
edits
Changes
→Case B - Using the Parallel Stacks Window
[[File:Stacks-step2.PNG|500px|center|Worker 3]]
Also, the middle box indicates the 2 threads, Worker 1 and Worker 2, which seem to just be waiting for work. Main Thread on the left also seems to be just waiting.
Third function call:
cilk_spawn boo();
Now worker 1 has taken charge of the next spawned thread, highlighted in blue:
[[File:Stacks-step3.PNG|500px|center|Worker 1]]
Fourth function call:
cilk_spawn doo();
Finally, worker 2 picks up the next spawned thread:
[[File:Stacks-step4.PNG|500px|center|Worker 2]]
At this point, the Main thread, in function foo, has already printed its line.
==Case C==