Boost logo

Boost :

Subject: Re: [boost] [threadpool] relation with TR2 proposal
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2008-09-18 14:07:14


----- Original Message -----
From: "Johan Torp" <johan.torp_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Tuesday, September 16, 2008 12:29 PM
Subject: Re: [boost] [threadpool] relation with TR2 proposal

> 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
> se.
> 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
> ...
> }

Hi Johan,

Should this behaviour be extended to other synchronization functions like
mutex lock, condition wait, ... ?

For this to work all these primitives must be wrapped, replacing the
blocking primitives by the corresponding try_ primitives.
In addition the threadpool should provide a one step scheduling on the
*current* worker thread.

What do you think?

Vicente


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk