We use the descriptor like a white board to record the status of our overall parallel progress.
So is the descriptor some independent part of the thread memory which contains pointers? to various thread contexts storing task state and other things? And the descriptor is created for each execution context or thread context?
As far as I can tell a descriptor is just any data that you pass around at runtime. You can have descriptors for most types of context depending on what type of data one is trying to store. In this case they would be for the execution context and store pointers and flags.
If there was no cilk_sync before the call to bar(), would one of the threads start executing bar() while the others are still doing foo(i)? And would bar() be considered a continuation from foo(9)?
@huehue I believe the main thread can run bar(), if its queue is empty, which is possible if other threads have stolen work.