> On Aug. 19, 2015, 1:42 a.m., Ben Mahler wrote: > > src/linux/perf.cpp, lines 484-490 > > <https://reviews.apache.org/r/37416/diff/3/?file=1043975#file1043975line484> > > > > Couple of things: > > > > (1) Let's add a comment as to why we're using await here, since it is > > an anti-pattern. Namely, is it because making supported() asynchronous is a > > difficult change? > > > > (2) Let's discard the future when it doesn't transition in the timeout. > > > > (3) We're going to silently say false if the future fails, can we log > > the failure? > > > > (4) 'if (' :) > > > > (5) Can you add some newlines here to make it less dense?
What is the advantage of calling discard() on version here? At the moment, we pass version as a const ref, so calling discard is not possible. We could remove the const constraint, but then we would have to pass an lvalue from supported. - Paul ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/37416/#review95809 ----------------------------------------------------------- On Aug. 20, 2015, 4:39 p.m., Paul Brett wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/37416/ > ----------------------------------------------------------- > > (Updated Aug. 20, 2015, 4:39 p.m.) > > > Review request for mesos and Ben Mahler. > > > Repository: mesos > > > Description > ------- > > Perf supported() should be based on the version of perf, not the version of > the kernel. > > > Diffs > ----- > > src/linux/perf.cpp cdc5f8314a875ababf2b17a32873775d808e1c78 > > Diff: https://reviews.apache.org/r/37416/diff/ > > > Testing > ------- > > sudo make check > > > Thanks, > > Paul Brett > >