« Return to Thread: [future] Early draft of wait for multiple futures interface

Re: [future] Early draft of wait for multiple futures interface

by Johan Torp :: Rate this Message:

Reply to Author | View in Thread

Anthony Williams-4 wrote:
> I don't think your proposed interface is powerful enough to implement
> composed futures, but I might be wrong. For instance, how would you
> implement future operators with it?
>
> future<bool> operator||(future<bool> lhs, future<bool> rhs);

Using wait callbacks:
is_ready doesn't trigger the callback, so this won't work.

OTOH, I think is_ready should trigger the callback, even for the "run extra work in wait()" thread pool use case.

Johan

Johan

 « Return to Thread: [future] Early draft of wait for multiple futures interface