[RFC] extending ev++.h to add C++ loop wrappers.

Marc Lehmann schmorp at schmorp.de
Thu Jan 17 09:26:58 CET 2008

On Wed, Jan 16, 2008 at 05:20:06PM -0200, Leandro Lucarella <llucax at gmail.com> wrote:
> > (like watchers? but since they are radically different methods, maybe the
> > must be called otherwise). Maybe just loop -> do_loop?
> Even more, if we call it loop, then we can't name the internal base
> watcher variable "loop" either :S

Yeah.. of course.. but...

ev::loop might be worse than ev::loop_ref (or maybe not, not sure). I would
expect programs to use ev::loop_dynamic sometimes, ev::loop_default more
often and accessing the loop itself by name very rarely, i.e.

  // expected:
  watcher.loop->unloop ();

  // unexpected
  ev::loop_something l = watcher.loop;
  l.unloop ();

The othe rhting is that most people do not really copy references around, it
makes little sense (there is no value semantics), so a loop * would do fine
as well.

                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 mailing list