"Ovanes Markarian"
On Wed, July 25, 2007 17:06, Andrew Holden wrote:
Ovanes Markarian wrote:
Thanks for you link, a very interesting one ;) I ment this one in my previous post: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2276.html
Another interesting technology. I'll need to examine it more closely. It looks similar to TBB. Intel's implementation of TBB uses tasks and thread pools. Instead of futures, it uses canned parallel algorithms that WILL complete before returning, thus freeing the user from worrying that values might not be ready.
It looks like the futures run at a somewhat lower level than TBB, which is certainly not a bad thing. I can already see the beginnings of some ideas where it might do things that TBB can't, like any situation where you wish to launch a separate thread (or task) and forget about it. I'm also intrigued by the option of waiting an a specific return value from the thread instead of joining the entire thread, like in boost.thread.
I find myself wordering if this would be a worthy addition to boost.thread. It looks like you could use a boost.thread condition object in the implementation of a future.
AFAIK Peter Dimov did some technology evaluation and implementation for futures. I also saw that Howard Hinnant was working on futures. May be there are already some implemenations which prove the concept.
I have an incomplete prototype of the futures and thread pools from N2276. I intend to add it to boost.thread once the move to subversion is complete, and adjust it in line with whatever the C++ committee approve. Anthony -- Anthony Williams Just Software Solutions Ltd - http://www.justsoftwaresolutions.co.uk Registered in England, Company Number 5478976. Registered Office: 15 Carrallack Mews, St Just, Cornwall, TR19 7UL