Boost logo

Boost :

Subject: Re: [boost] Detached threads and Futures
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2009-11-14 11:28:42


Hi,
----- Original Message -----
From: <ak1mbox-boost_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Saturday, November 14, 2009 5:01 PM
Subject: [boost] Detached threads and Futures

>
> Hi,
>
> I wanted to judge people interest in the following feature and to see [hope :)] that maybe it is already scheduled to appear in the next thread library.
>
> I find it often useful to run blocking operations in a fully detached thread. These are often atomic IO operations which receive some input by copy and then if they succeed return some output or error if they fail. The functionality that I need can be described as follow:
>
> 1. Encapsulate some code, providing ability to send it any number of parameters
> 2. Receive notification when this code has finished doing whatever it was supposed to be doing and get the resulting output or error.
> 3. Be able to terminate all other threads without the fear of the detached thread causing a memory corruption.
> 4. [Optional] Indicate to the detached thread that it should try to interrupt its operation and exit but not really care if it can't at this point.
>
> With Anthony Williams Futures addition to the thread library implementing something like this should not be too difficult. Is this already in the works or would people be interested in someone taking this on as a standalone library and an addition to thread library?

I suppose that the Boost.Task library should respond to your needs.

Best,
Vicente


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