|
Boost : |
From: Johan Torp (johan.torp_at_[hidden])
Date: 2008-05-30 10:49:33
Anthony Williams-4 wrote:
>
>> is_ready doesn't trigger the callback, so this won't work.
>
> That depends on what you mean by "work".
>
> It isn't ready, so is_ready() returns false. It just happens to always
> return false until you do something to make it ready.
>
> If you wait on it, it becomes ready. If you don't wait, it
> doesn't. This is the essential problem with lazy futures.
>
That is way too strange semantics. A user would not expect having to call
wait() or get() to make a future become ready. I have been thinking about
not type erasing the laziness and instead providing a lazy_future class or
composite future class. But I think inherent, type-erased laziness is a
better idea.
Johan
-- View this message in context: http://www.nabble.com/-future--Early-draft-of-wait-for-multiple-futures-interface-tp17242880p17560858.html Sent from the Boost - Dev mailing list archive at Nabble.com.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk