
2 Jun
2008
2 Jun
'08
7:58 p.m.
Frank Mori Hess:
However, the William's future does not currently support any multi-multiwait. Its wait_for_all and wait_for_any do not return futures but block when called. The Gaskill futures do have operator|| and operator&& but they are not efficient enough to build a scheduler on.
I think that wait_for_any would be enough for such a scheduler. In pseudocode, the dependency-resolving thread would do something like the following, in a loop: set< future<void> > waiting_, ready_; wait_for_any( waiting_ ); // for_each in waiting_ // if ready() move to ready_ // for each pending target // if dependencies are a subset of ready_, move to exec queue // garbage-collect ready_ in some way :-)