ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libev/README
(Generate patch)

Comparing libev/README (file contents):
Revision 1.17 by root, Mon Nov 12 05:40:55 2007 UTC vs.
Revision 1.21 by root, Fri Mar 30 17:43:55 2012 UTC

1Homepage: http://software.schmorp.de/pkg/libev 1libev is a high-performance event loop/event model with lots of features.
2E-Mail: libev@schmorp.de 2(see benchmark at http://libev.schmorp.de/bench.html)
3 3
4libev is a high-performance event loop/event model with lots of features.
5 4
6It is modelled (very losely) after libevent 5ABOUT
7(http://monkey.org/~provos/libevent/) and the Event perl module, but aims
8to be faster and more correct, and also more featureful.
9 6
10DIFFERENCES AND COMPARISON TO LIBEVENT: 7 Homepage: http://software.schmorp.de/pkg/libev
8 Mailinglist: libev@lists.schmorp.de
9 http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev
10 Library Documentation: http://pod.tst.eu/http://cvs.schmorp.de/libev/ev.pod
11 11
12(comparisons relative to libevent-1.3e and libev-0.00, see also the benchmark 12 Libev is modelled (very losely) after libevent and the Event perl
13at http://libev.schmorp.de/bench.html). 13 module, but is faster, scales better and is more correct, and also more
14 featureful. And also smaller. Yay.
14 15
15- multiple watchers can wait for the same event without deregistering others, 16 Some of the specialties of libev not commonly found elsewhere are:
16 both for file descriptors as well as signals. 17
17 (registering two read events on fd 10 and unregistering one will not 18 - extensive and detailed, readable documentation (not doxygen garbage).
18 break the other). 19 - fully supports fork, can detect fork in various ways and automatically
20 re-arms kernel mechanisms that do not support fork.
21 - highly optimised select, poll, epoll, kqueue and event ports backends.
22 - filesystem object (path) watching (with optional linux inotify support).
23 - wallclock-based times (using absolute time, cron-like).
24 - relative timers/timeouts (handle time jumps).
25 - fast intra-thread communication between multiple
26 event loops (with optional fast linux eventfd backend).
27 - extremely easy to embed (fully documented, no dependencies,
28 autoconf supported but optional).
29 - very small codebase, no bloated library, simple code.
30 - fully extensible by being able to plug into the event loop,
31 integrate other event loops, integrate other event loop users.
32 - very little memory use (small watchers, small event loop data).
33 - optional C++ interface allowing method and function callbacks
34 at no extra memory or runtime overhead.
35 - optional Perl interface with similar characteristics (capable
36 of running Glib/Gtk2 on libev).
37 - support for other languages (multiple C++ interfaces, D, Ruby,
38 Python) available from third-parties.
19 39
20- fork() is supported and can be handled 40 Examples of programs that embed libev: the EV perl module, node.js,
21 (there is no way to recover from a fork when libevent is active). 41 auditd, rxvt-unicode, gvpe (GNU Virtual Private Ethernet), the
42 Deliantra MMORPG server (http://www.deliantra.net/), Rubinius (a
43 next-generation Ruby VM), the Ebb web server, the Rev event toolkit.
22 44
23- timers are handled as a priority queue (important operations are O(1))
24 (libevent uses a much less efficient but more complex red-black tree).
25 45
26- supports absolute (wallclock-based) timers in addition to relative ones, 46CONTRIBUTORS
27 i.e. can schedule timers to occur after n seconds, or at a specific time.
28 47
29- timers can be repeating (both absolute and relative ones). 48 libev was written and designed by Marc Lehmann and Emanuele Giaquinta.
30 49
31- detects time jumps and adjusts timers 50 The following people sent in patches or made other noteworthy
32 (works for both forward and backward time jumps and also for absolute timers). 51 contributions to the design (for minor patches, see the Changes
52 file. If I forgot to include you, please shout at me, it was an
53 accident):
33 54
34- race-free signal processing 55 W.C.A. Wijngaards
35 (libevent may delay processing signals till after the next event). 56 Christopher Layne
57 Chris Brody
36 58
37- less calls to epoll_ctl
38 (stopping and starting an io watcher between two loop iterations will now
39 result in spuriois epoll_ctl calls).
40
41- usually less calls to gettimeofday and clock_gettime
42 (libevent calls it on every timer event change, libev twice per iteration).
43
44- watchers use less memory
45 (libevent on amd64: 152 bytes, libev: <= 56 bytes).
46
47- library uses less memory
48 (libevent allocates large data structures wether used or not, libev
49 scales all its data structures dynamically).
50
51- no hardcoded arbitrary limits
52 (libevent contains an off-by-one bug and sometimes hardcodes a limit of
53 32000 fds).
54
55- libev separates timer, signal and io watchers from each other
56 (libevent combines them, but with libev you can combine them yourself
57 by reusing the same callback and still save memory).
58
59- simpler design, backends are potentially much simpler
60 (in libevent, backends have to deal with watchers, thus the problems)
61 (epoll backend in libevent: 366 lines, libev: 90 lines, and more features).
62
63- libev handles EBADF gracefully by removing the offending fds.
64
65- doesn't rely on nonportable BSD header files.
66
67- a event.h compatibility header exists, and can be used to run a wide
68 range of libevent programs unchanged (such as evdns.c).
69
70- win32 compatibility for the core parts.
71
72- the event core library (ev and event layer) compiles and works both as
73 C and C++.
74
75whats missing?
76
77- no event-like priority support at the moment (the ev priorities
78 are not yet finished and work differently, but you can use idle watchers
79 to get a similar effect).
80
81AUTHOR
82
83libev was written and designed by Marc Lehmann and Emanuele Giaquinta.
84
85The following people sent in patches or made other noteworthy
86contributions (if I forgot to include you, please shout at me, it was an
87accident):
88
89W.C.A. Wijngaards
90Christopher Layne
91Chris Brody
92

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines