[zeromq-dev] Application loop methods
Arnaud Loonstra
arnaud at sphaero.org
Thu Jan 2 20:47:13 CET 2014
On 01/02/2014 04:22 PM, Arnaud Loonstra wrote:
> Hi all,
>
> I was reading through czmq's zloop class and wondering what methods
> exists for creating application loops. I'm used to using frameworks
> which handle these so I'm not really 'under the hood' often. From what I
> can tell zeroMQ uses filedescriptor polling a lot
> (select/poll/epoll/kqueue?) zloop also uses timed events.
>
> QT/GTK have there own event system, QT uses signals but I think they are
> the same as events. I've also read about using (unix) signals for
> handling loops.
>
> It seems select, poll, epoll and kqueue are very efficient. What methods
> exist more? What do people advice or use most frequently?
If anybody is interested I've implemented a ZeroMQ eventloop for Urwid
(curses based UI library for Python). As I found Urwid uses select
polling it was quite easy to make a ZeroMQ version. Urwid also ships
with a Glib and Twisted eventloop.
https://gist.github.com/sphaero/8225315
Tested on Linux, Python3
Rg,
Arnaud
--
w: http://www.sphaero.org
t: http://twitter.com/sphaero
g: http://github.com/sphaero
i: freenode: sphaero_z25
More information about the zeromq-dev
mailing list