You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Benjamin Hindman <be...@berkeley.edu> on 2014/12/02 23:12:57 UTC
Re: Review Request 28315: Refactor clock to simplify libev cut.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28315/#review63585
-----------------------------------------------------------
3rdparty/libprocess/include/process/clock.hpp
<https://reviews.apache.org/r/28315/#comment105860>
I know we've gone back and forth on an "event loop interface", but after seeing this seperated out for Clock versus "general events" I think we should merge them for now. Moreover, let's just call it out for what it is, an event loop:
class EventLoop
{
public:
// Initializes the event loop.
virtual void initialize();
// Invoke the specified function in the event loop
// after the specified duration.
virtual void delay(double duration, void(*function)(void));
// Returns the current time w.r.t. the event loop.
virtual double time();
// Runs the event loop.
virtual void run();
};
If we want to make these be static instead of virtual for now that's fine, but either way lets include a comment above EventLoop that explains why we decided to use classes instead of just namespaces.
Finally, let's make this an internal header, libprocess/src/event_loop.hpp since users of Clock don't need to concern themselves with the implementation.
- Benjamin Hindman
On Nov. 26, 2014, 5:31 a.m., Joris Van Remoortere wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28315/
> -----------------------------------------------------------
>
> (Updated Nov. 26, 2014, 5:31 a.m.)
>
>
> Review request for mesos, Benjamin Hindman and Niklas Nielsen.
>
>
> Repository: mesos-git
>
>
> Description
> -------
>
> See summary.
>
>
> Diffs
> -----
>
> 3rdparty/libprocess/include/process/clock.hpp 1fd418b31133fd5a5444095ac887c77ee9375b2d
> 3rdparty/libprocess/src/clock.cpp dfe9ced2415b8567abb8c137ab73d90b59164d67
>
> Diff: https://reviews.apache.org/r/28315/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Joris Van Remoortere
>
>