
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Hartmut Kaiser Sent: Wednesday, March 14, 2007 8:52 AM To: boost@lists.boost.org Subject: Re: [boost] [futures] boost::futures
Braddock Gaskill wrote:
These operators should create a new (composite)future, exposing the same interface as the (simple) futures you're composing. This composite future should handle the exceptions in a similar way as the embedded ones, i.e. propagate the exceptions catched in the embedded futures to the caller, as appropriate.
So, that would mean that for f3 = f1 || f2, if f1 propagates an exception while f2 succeeds, f3 still propagates an exception?
I think this is very much use case dependent and anything you code into a library for good will hurt somebody else. So my best guess here is to implement a policy based behavior, allowing to custimize exception handling and propagation.
But if you think of it as logical or, the statement f1 || f2 || f3 says: "I don't care which one of these actually finishes, just that one does" just like b1 || b2 || b3 says, "This statement is true if one of b1, b2 or b3 are true". If this were policy based, it would be very confusing I would think.