|
Boost : |
From: Anthony Williams (anthony.ajw_at_[hidden])
Date: 2008-05-30 05:54:59
Hi all,
I've updated my futures library to include wait_for_any() and
wait_for_all().
The provided overloads allow either waiting on up to five futures
known at compile time:
unique_future<int> f1;
shared_future<std::string> f2;
unique_future<double> f3;
unsigned const ready_index=wait_for_any(future1,future2,future3);
or on a container of futures:
std::vector<jss::shared_future<int> > futures;
std::vector<jss::shared_future<int> >::iterator const future=
jss::wait_for_any(futures.begin(),futures.end());
In the first instance, they can be of distinct types, but in the
latter, all the futures in the container must be of the same type.
The documentation is available at
http://www.justsoftwaresolutions.co.uk/files/futures_documentation.html
and the files and tests are available at
http://www.justsoftwaresolutions.co.uk/files/n2561_futures_revised_20080530.zip
Anthony
-- Anthony Williams | Just Software Solutions Ltd Custom Software Development | http://www.justsoftwaresolutions.co.uk Registered in England, Company Number 5478976. Registered Office: 15 Carrallack Mews, St Just, Cornwall, TR19 7UL
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk