Boost logo

Boost :

Subject: [boost] Detached threads and Futures
From: ak1mbox-boost_at_[hidden]
Date: 2009-11-14 11:01:50


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?



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