|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2008-06-02 15:58:11
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 :-)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk