-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30545/#review71104
-----------------------------------------------------------


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).

- Jie Yu


On Feb. 4, 2015, 7:50 p.m., Chi Zhang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30545/
> -----------------------------------------------------------
> 
> (Updated Feb. 4, 2015, 7:50 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/linux/cgroups.hpp abf31df 
>   src/linux/cgroups.cpp 0b136e1 
> 
> Diff: https://reviews.apache.org/r/30545/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Chi Zhang
> 
>

Reply via email to