15 Oct
2012
15 Oct
'12
6:04 a.m.
Ben Darnell wrote: The problem is that as soon as task1 blocks on IO, the entire
current task (which includes outer(), par(), and both children) gets unscheduled. no part of task2 gets scheduled until it gets yielded from, because the scheduler can't see it until then.
The suggested implementation of par() that I posted does explicitly schedule the subtasks. Then it repeatedly yields, giving them a chance to run, until they all complete. -- Greg