> On Feb. 5, 2015, 12:50 a.m., Jie Yu wrote: > > Per our dicussion, could you expose and reuse the existing EventListener? > > Here are the thoughts: > > > > 1) s/EventListener/EventListenerProcess > > 2) expose EventListner (the wrapper for EventListenerProcess) in the header > > file > > 3) introduce a "Future<uint64_t> read()" function for EventListener (and > > EventListenerProcess) > > 4) The existing 'listen' function can be implemented as follows: create an > > EventListener, call read(), register an onAny for the returned future to > > delete EventListener > > 5) You need to be careful if any read fails/discarded. You probably want to > > fail all the subsequent reads if that happens (i.e., having a flag inside > > EventListenerProcess and return failed future for read() if the flag is > > set).
Merged. There is only one listener now. - Chi ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/30545/#review71104 ----------------------------------------------------------- On Feb. 12, 2015, 8:08 p.m., Chi Zhang wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/30545/ > ----------------------------------------------------------- > > (Updated Feb. 12, 2015, 8:08 p.m.) > > > Review request for mesos, Dominic Hamon, Ian Downes, and Jie Yu. > > > Bugs: MESOS-2136 > https://issues.apache.org/jira/browse/MESOS-2136 > > > Repository: mesos > > > Description > ------- > > cgroups: added support to listen on memory pressures. > > > Diffs > ----- > > src/Makefile.am 39ce858fd009f8aef388bd3d6b17aa4c885ff9c9 > src/linux/cgroups.hpp bf8efee05b995a37d4e6e7679a493b2d5238aa0b > src/linux/cgroups.cpp b6f75b14dea7609b90627eccdd33ef891ed9d21f > src/tests/cgroups_tests.cpp 9d50a47c939f5f136c85fdcc555459512c6f2259 > src/tests/memory_test_helper.hpp PRE-CREATION > src/tests/memory_test_helper.cpp PRE-CREATION > src/tests/memory_test_helper_main.cpp PRE-CREATION > > Diff: https://reviews.apache.org/r/30545/diff/ > > > Testing > ------- > > > Thanks, > > Chi Zhang > >
