[RFC] extending ev++.h to add C++ loop wrappers.
schmorp at schmorp.de
Fri Jan 18 06:13:36 CET 2008
On Wed, Jan 16, 2008 at 03:37:12PM -0200, Leandro Lucarella <llucax at gmail.com> wrote:
> > Well, I think its a wonderful idea, its a loop, it should be called loop :)
> If we call it loop, then the loop() method has to be called other way,
> that's why I didn't call it loop. Maybe loop -> start, unloop -> stop
> (like watchers? but since they are radically different methods, maybe the
> must be called otherwise). Maybe just loop -> do_loop?
loop::run () // flags=0
loop::one_iteration () // once
loop::sweep () // nonblock
would be possible :) Or even:
the reason it is called ev_loop is caused by a limitation in C's object
orientation, and I think we can get away with renaming it here (it
actually is taken mostly from libevent, and today I think maybe its not
that good an interface).
I am not saying we should rename it, its basically the question wether we
want to use something ugly like loop_ref and a loop_ref::loop, or a loop,
and a renamed (nut nice) loop::run ().
The choice of a Deliantra, the free code+content MORPG
-----==- _GNU_ http://www.deliantra.net
----==-- _ generation
---==---(_)__ __ ____ __ Marc Lehmann
--==---/ / _ \/ // /\ \/ / pcg at goof.com
More information about the libev