> On April 25, 2014, 9:24 p.m., Ben Mahler wrote: > > 3rdparty/libprocess/include/process/metrics/timer.hpp, line 86 > > <https://reviews.apache.org/r/20593/diff/2/?file=565984#file565984line86> > > > > To be even more explicit, how about: > > > > future > > .onAny(...); > > > > return future; > > > > (Normally we'll place callbacks on separate lines) > > Dominic Hamon wrote: > not: > > Future<T> future = future_ > .onAny(...); > return future; > > ? > > I expected to have to return the future from onAny rather than the future > that's passed in.
onAny just returns the same future, to allow one to easily add callbacks: future .onAny() .onAny() .onFailure() .onReady() Here we just want to add our callback and return the same future, your snippet above will do the same thing as: future .onAny(...); return future; - Ben ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/20593/#review41529 ----------------------------------------------------------- On April 25, 2014, 11:29 p.m., Dominic Hamon wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/20593/ > ----------------------------------------------------------- > > (Updated April 25, 2014, 11:29 p.m.) > > > Review request for mesos and Ben Mahler. > > > Repository: mesos-git > > > Description > ------- > > see summary > > > Diffs > ----- > > 3rdparty/libprocess/include/process/metrics/timer.hpp > c8e1d91bdc39fb0702bc761e98807abdade4996d > 3rdparty/libprocess/src/tests/metrics_tests.cpp > 294aed424983bbbcaf74c0417c6bcd36a496acb7 > > Diff: https://reviews.apache.org/r/20593/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Dominic Hamon > >
