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

Comparing libev/README (file contents):
Revision 1.4 by root, Wed Oct 31 00:24:16 2007 UTC vs.
Revision 1.23 by root, Sat Jun 26 16:24:25 2021 UTC

1libev is modelled after libevent (http://monkey.org/~provos/libevent/), but aims 1libev is a high-performance event loop/event model with lots of features.
2to be faster and more correct, and also more featureful. Examples: 2(see benchmark at http://libev.schmorp.de/bench.html)
3 3
4- multiple watchers can wait for the same event without deregistering others,
5 both for file descriptors as well as signals.
6 (registering two read events on fd 10 and unregistering one will not
7 break the other)
8 4
9- fork() is supported and can be handled 5ABOUT
10 (there is no way to recover from a fork when libevent is active)
11 6
12- timers are handled as a priority queue 7 Homepage: http://software.schmorp.de/pkg/libev
13 (libevent uses a less efficient red-black tree) 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
14 11
15- supports absolute (wallclock-based) timers in addition to relative ones, 12 Libev is modelled (very losely) after libevent and the Event perl
16 i.e. can schedule timers to occur after n seconds, or at a specific time. 13 module, but is faster, scales better and is more correct, and also more
14 featureful. And also smaller. Yay.
17 15
18- timers can be repeating (both absolute and relative ones) 16 Some of the specialties of libev not commonly found elsewhere are:
17
18 - extensive and detailed, readable documentation (not doxygen garbage).
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, linux epoll, linux aio, bsd kqueue
22 and solaris event ports backends.
23 - filesystem object (path) watching (with optional linux inotify support).
24 - wallclock-based times (using absolute time, cron-like).
25 - relative timers/timeouts (handle time jumps).
26 - fast intra-thread communication between multiple
27 event loops (with optional fast linux eventfd backend).
28 - extremely easy to embed (fully documented, no dependencies,
29 autoconf supported but optional).
30 - very small codebase, no bloated library, simple code.
31 - fully extensible by being able to plug into the event loop,
32 integrate other event loops, integrate other event loop users.
33 - very little memory use (small watchers, small event loop data).
34 - optional C++ interface allowing method and function callbacks
35 at no extra memory or runtime overhead.
36 - optional Perl interface with similar characteristics (capable
37 of running Glib/Gtk2 on libev).
38 - support for other languages (multiple C++ interfaces, D, Ruby,
39 Python) available from third-parties.
19 40
20- detects time jumps and adjusts timers 41 Examples of programs that embed libev: the EV perl module, auditd,
21 (works for both forward and backward time jumps and also for absolute timers) 42 rxvt-unicode, gvpe (GNU Virtual Private Ethernet), the Deliantra MMORPG
43 server (http://www.deliantra.net/), Rubinius (a next-generation Ruby
44 VM), the Ebb web server, the Rev event toolkit.
22 45
23- can correctly remove timers while executing callbacks
24 (libevent doesn't handle this reliably and can crash)
25 46
26- race-free signal processing 47CONTRIBUTORS
27 (libevent may delay processing signals till after the next event)
28 48
29- less calls to epoll_ctl 49 libev was written and designed by Marc Lehmann and Emanuele Giaquinta.
30 (stopping and starting an io watcher between two loop iterations will now
31 result in spuriois epoll_ctl calls)
32 50
33- usually less calls to gettimeofday and clock_gettime 51 The following people sent in patches or made other noteworthy
34 (libevent calls it on every timer event change, libev twice per iteration) 52 contributions to the design (for minor patches, see the Changes
53 file. If I forgot to include you, please shout at me, it was an
54 accident):
35 55
36- watchers use less memory 56 W.C.A. Wijngaards
37 (libevent on amd64: 152 bytes, libev: <= 56 bytes) 57 Christopher Layne
58 Chris Brody
38 59
39- library uses less memory
40 (libevent allocates large data structures wether used or not, libev
41 scales all its data structures dynamically)
42
43- no hardcoded arbitrary limits
44 (libevent contains an off-by-one bug and sometimes hardcodes a limit of
45 32000 fds)
46
47- libev separates timer, signal and io watchers from each other
48 (libevent combines them, but with libev you can combine them yourself
49 by reusing the same callback and still save memory)
50
51- simpler design, backends are potentially much simpler
52 (in libevent, backends have to deal with watchers, thus the problems)
53 (epoll backend in libevent: 366 lines, libev: 89 lines, and more features)
54
55whats missing?
56
57- evdns, evhttp, bufferevent are missing, libev is only an even library at
58 the moment.
59
60- no priority support at the moment
61
62- kqueue, poll (libev currently implements epoll and select)
63
64- windows support (whats windows?)
65

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines