Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Kevin Scarr

Pages: [1]
1
General Discussion about just::thread / Support for wait_for_any?
« on: January 01, 2012, 12:59:08 AM »
Hello

I realise that the C++11(?) standard probably does not include this facility, however the futures implementation in Boost.Thread has a "wait_for_any()" facility and I was wondering if just::thread's futures also supported something similar (ie am I missing something basic)?

Alternatively, are then any suggestions for rolling my own?? By which (of course) I am hoping for a concrete example :)

Right now, I have had to revert to the futures implementation in Boost.Thread although I still use just::thread for core thread support. Just some background: I have a pool of worker threads storage in a std::list< shared_ptr<task> > and I need the main thread to wait in case one of them explodes. Normal termination involves waking the main thread and actively stopping & join()ing the threads.

Happy New Year to all!
Kevin

Pages: [1]