Boost logo

Boost :

From: vicente.botet (vicente.botet_at_[hidden])
Date: 2008-04-30 07:29:04


Hello,

I have several implementations of the same function with different algorithms. I want to launch these in parallel and join the one finishing the first, and stop the others.

I have started and in my solution I need to wrap the function in order to make the needed synchronization, which seam not quite satisfactory.

Is there an easy way to join the first thread that finish from a thread group and getting it?

    boost::thread_group tg;
    // ...
    boost::thread* first = tg.join_one();

Do you find useful this feature?

Regards
_____________________
Vicente Juan Botet Escriba


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