> On Feb. 20, 2014, 4:37 p.m., Dominic Hamon wrote: > > 3rdparty/libprocess/include/process/collect.hpp, line 2 > > <https://reviews.apache.org/r/18311/diff/1/?file=498993#file498993line2> > > > > possibly naive question: instead of having a full copy of this header > > with the type changed, would it be possible to just typedef > > 'process::tuple' or add a 'stout::tuple' that is either a > > boost::tuples::tuple or std::tuple? > > TILL TOENSHOFF wrote: > There is a point in what you say, but it wont fix things entirely. > > The C++11 implementation makes use of "proper" lambdas, the other > implementation does not but emulates those by the use of _await and _then. > > However, pulling boost::tupes::tuple or std::tuple into the libprocess > namespace depending on the availability is a good idea (unless it clashes at > a point I dont see right now). I will suggest another RR and adapt this one > to make use of this once that is done. > > TILL TOENSHOFF wrote: > I made this RR dependent on 18360 to allow for having a unified > tuple-definition. > > To entirely "fix" what you aimed for, the collect-header would have to be > sprinkled with a bunch of #if-#else's which I hesitated to do for making our > final transition to C++11 a bit easier. I do however see that my approach > caused code duplication. Feeling unsure which route to take, I left it this > way. Let me know if that is a problem as I would be happy to adapt to > whatever is recommended by the committers.
After revisiting the remaining comments, I decided to switch over to a unified header. It actually makes more sense as I did not C++11ify the existing implementations of collect and await. - TILL ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/18311/#review35007 ----------------------------------------------------------- On Feb. 24, 2014, 7:42 p.m., TILL TOENSHOFF wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/18311/ > ----------------------------------------------------------- > > (Updated Feb. 24, 2014, 7:42 p.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/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 > >