Boost logo

Boost :

From: Johan Torp (johan.torp_at_[hidden])
Date: 2008-05-26 03:43:54

Frank Mori Hess-2 wrote:
> The more general solution that accepts multiple arguments would be like
> future_barrier, except it would accept an additional first argument that
> is the conversion function, and it would return a future<R> where the
> value R for the returned future is obtained by calling the conversion
> function with all the values from the input futures. So it might look
> something like
> R combining_function(const T1 &t1, const T2 &t2, ..., const TN &tn);
> future<T1> f1;
> future<T1> f2;
> //...
> future<T1> fN;
> future<R> result = future_combining_barrier(&combining_function, f1,
> f2, ..., fN);

This is how I imagine the barrier/wait-for-all case looks too. The
select/switch/wait-for-any case is tricker if we wan't to supply the same
type safety for heterogenous types.


View this message in context:
Sent from the Boost - Dev mailing list archive at

Boost list run by bdawes at, gregod at, cpdaniel at, john at