> On Feb. 20, 2014, 7:37 p.m., Vinod Kone wrote: > > 3rdparty/libprocess/include/process/collect.hpp, lines 323-326 > > <https://reviews.apache.org/r/18311/diff/1/?file=498993#file498993line323> > > > > Why is this .then? What happens if await() returns a failed future? > > TILL TOENSHOFF wrote: > Then the returned future will be stated to failed.
Re-reading your comment, I feel a bit unsure on what you aim for. However, the following passes if that answers your question: Promise<int> promise1; Promise<bool> promise2; Option<Timeout> timeout = Timeout::in(Milliseconds(10)); Future<tuples::tuple<Future<int>, Future<bool> > > future = await(promise1.future(), promise2.future(), timeout); ASSERT_TRUE(future.isPending()); promise1.set(42); os::sleep(Milliseconds(20)); ASSERT_TRUE(future.isFailed()); Please let me know if I can drop this issue. - TILL ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/18311/#review35040 ----------------------------------------------------------- On Feb. 22, 2014, 1:05 a.m., TILL TOENSHOFF wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/18311/ > ----------------------------------------------------------- > > (Updated Feb. 22, 2014, 1:05 a.m.) > > > Review request for mesos, Adam B, Benjamin Hindman, Ben Mahler, Niklas > Nielsen, and Vinod Kone. > > > Repository: mesos-git > > > Description > ------- > > Currently the Process::await implementation on list<Future>, by the nature of > std::list, expects equally typed futures. This new override implements await > for a tuple of futures, hence allows awaiting differently typed futures in a > single call. > > There also is a new override that allows await on a single Future, a > convenience approach for allowing a Process based await on a single Future > without forcing the user to render a list or tuple out of that. > > A C++11 and a boost-based implementation have been added. > > This patch also includes tests on those new overrides. > > > Diffs > ----- > > 3rdparty/libprocess/include/process/c++11/collect.hpp PRE-CREATION > 3rdparty/libprocess/include/process/collect.hpp 2a73bc9 > 3rdparty/libprocess/src/tests/process_tests.cpp e899aed > > Diff: https://reviews.apache.org/r/18311/diff/ > > > Testing > ------- > > make check (clang c++11, gcc) > > > Thanks, > > TILL TOENSHOFF > >