Boost logo

Boost :

Subject: Re: [boost] Futures
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2015-01-06 05:23:25


On 5 Jan 2015 at 22:41, Vicente J. Botet Escriba wrote:

> > For example, right now can boost::wait_all() ever consume
> > std::futures? I suspect not because the HANDLE on Windows or the
> > futex on Linux is rather hard to get at.
> The current implementation doesn't accept std::futures, but there is no
> reason it can not accept other futures. All what is needed is the
> Future::wait() interface.
>
> wait_for_any is different. The Boost thread implementation uses a list
> of condition_variable to notify when a the future becomes ready. Having
> a generic future<T>::notify_when_ready(condition_variable) will surely help.

I would *far* prefer a notify_when_ready(callable), not least because
condition_variables are lost wakeup prone.

But then you're effectively making futures into ASIO async_result.

Niall

-- 
ned Productions Limited Consulting
http://www.nedproductions.biz/ 
http://ie.linkedin.com/in/nialldouglas/



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