1 Jun 01:20
Re: Updated version of futures library
Frank Mori Hess <fmhess <at> speakeasy.net>
2008-05-31 23:20:55 GMT
2008-05-31 23:20:55 GMT
On Saturday 31 May 2008 17:14, Hartmut Kaiser wrote: > > On Saturday 31 May 2008 14:30, Hartmut Kaiser wrote: > > > > I.e. future<bool> operator&&(future<bool>& lhs, future<bool>& > > > > rhs) would return a new future which is equal to true, iff > > > > lhs.get()==true and rhs.get()==true. If either one returned false > > > > it > > > > > > would be false and otherwise the composed future would not be > > > > ready yet. > > > > > > Doing it the way you're proposing implies shortcutting operator&&(), > > > which can't be implemented. > > > > left-to right evaluation can't be short-circuited, but he's talking > > Right, that's exactly my point. > > > about short circuiting in time, as either the lhs or rhs futures > > complete. > > Didn't we talk about operator&&()? No 'either/or' here, only both > futures. Additionally, the same comments apply as outlined below. I'm pretty sure he's not talking about your "wait_for_all" operator&&() at all, he's talking about one with semantics closer to the "real" operator&& defined by the language. > My main point was that such operator overloads apply to the result types > and not the futures themselves, which adds unnecessary semantics and(Continue reading)
I have immediately replaced boost::function with
boost::functional::polymorphic_function in msf-1.2 (also under vault,
but in base directory) and gave it a spin.
Unfortunately I was not able to make it work.
Some boost::function API, necessary for msf-1.2, are not supported:
operator==(), empty(), clear(), contains()
I said, ok not a biggie, I can just use polymorphic_function::target()
and build something similar myself.
But what stopped me is that target() does not seem to work.
RSS Feed