[phobos] std.event / event loop for phobos

Johannes Pfau johannespfau at googlemail.com
Thu Sep 9 08:43:09 PDT 2010


 On 09.09.2010 15:57, Andrei Alexandrescu wrote:
> I don't know much about licence, but I have this question: which is
> better, libev or libevent?
>
Libev is faster than libevent1 (http://libev.schmorp.de/bench.html) But
libevent2 (currently in RC state) is said to be as fast as libev, so
that doesn't really matter. The biggest difference between the libraries
is the set of event sources they support: Libevent supports i/o and
timeouts, libev additionally supports "wall clock timers", events on
posix signals, child process changes, stat events (file changed /
directory changed,...) and a few more.
The licenses are almost the same (3 clause BSD for libevent, 2 clause
BSD for libev).

I've read through the documentation of libev and think it has a nice api
and feature set. I have to admit that I have not yet used libev or
libevent personally though, so I can't really give you a good
comparison. Sean posted somewhere in the newsgroup that he had used
libevent, so maybe he can give more information.

Leandro Lucarella has a libev binding & wrapper for D1, maybe that could
be adapted for phobos:
http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D&artnum=112967
<http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D&artnum=112967>

-- 
Johannes Pfau



More information about the phobos mailing list