Boost logo

Boost :

Subject: Re: [boost] [threadpool] relation with TR2 proposal
From: Johan Torp (johan.torp_at_[hidden])
Date: 2008-09-16 06:29:04

k-oli wrote:
> Am Dienstag, 16. September 2008 11:49:49 schrieb Johan Torp:
>> There are at least two things which still needs be solved:
>> 1. How to wait for multiple futures
> Braddocks future lib provides support logical ops for futures:
> future< int > f1 = ...
> future< string > f2 = ...
> future< void > f3 = op( f1) && op( f2);
> f3.wait(); // waits for f1 and f2

Yes, but it is implemented in terms of a public callback. IMHO, this is
_really_ dangerous.

k-oli wrote:
>> 2. How to employ work-stealing when one thread waits on a future
> Do you mean fork/join algorithm instead work-stealing?

Yes, you're right - it does not have anything to do with work-stealing per
I mean that you want to intercept when a worker thread should have been
blocked and process other tasks in the wait call:

void some_user_level_task() {
  some_future.wait(); // Do not really wait, execute other tasks using the
same call stack


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