----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/28184/#review62448 -----------------------------------------------------------
3rdparty/libprocess/src/libev.hpp <https://reviews.apache.org/r/28184/#comment104490> this makes me uncomfortable but i can't quite pin down why. would a better construction be: ThreadLocal<bool>* in_event_loop() { static ThreadLocal<bool> in_event_loop; return &in_event_loop; } which gets you lazy initialization of the thread local but without macro usage, and avoids the issue of the non-determinism of static initialization. - Dominic Hamon On Nov. 20, 2014, 2:34 p.m., Joris Van Remoortere wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/28184/ > ----------------------------------------------------------- > > (Updated Nov. 20, 2014, 2:34 p.m.) > > > Review request for mesos, Benjamin Hindman and Niklas Nielsen. > > > Bugs: MESOS-2125 > https://issues.apache.org/jira/browse/MESOS-2125 > > > Repository: mesos-git > > > Description > ------- > > This improves performance by short-circuiting run_in_event_loop to just call > the lambda if it is already in the event loop. > > > Diffs > ----- > > 3rdparty/libprocess/src/libev.hpp 04847e30b0d764d258b8c0971da87180043161f2 > 3rdparty/libprocess/src/process.cpp > 00cd89f7645db4401c92de25d3516047a5e21ff1 > > Diff: https://reviews.apache.org/r/28184/diff/ > > > Testing > ------- > > make check > 3rdparty/libprocess/benchmark improved throughput ~27% > > > Thanks, > > Joris Van Remoortere > >
