3 ms·
A Cilk-style depth-first work stealing executor would block by default, but if any executor has free cycles it can steal the continuation and generate more work
by gpderetta 6y ago
A Cilk-style depth-first work stealing executor would block by default, but if any executor has free cycles it can steal the continuation and generate more work. You would need to wait only when work is actually needed or when returning from the function.
Cilk requires annotating async functions calls at the call point (with the spawn keyword to make them async), but not the funciton themselves, so there is no red/blue coloring.
Synchronization is explicit via the sync keyword, but in principle I think a compiler could insert the sync point on first use of the value.
I don't think a cilk style runtime would be heavier than an executor behind async/await.
- deleted 6y ago[deleted]