1 | libev is modelled after libevent (http://monkey.org/~provos/libevent/), but aims |
1 | libev is modelled after libevent (http://monkey.org/~provos/libevent/), but aims |
2 | to be faster and more correct, and also more featureful. Examples: |
2 | to be faster and more correct, and also more featureful. Examples: |
|
|
3 | |
|
|
4 | (comparisons relative to libevent-1.3e and libev-0.00) |
3 | |
5 | |
4 | - multiple watchers can wait for the same event without deregistering others, |
6 | - multiple watchers can wait for the same event without deregistering others, |
5 | both for file descriptors as well as signals. |
7 | both for file descriptors as well as signals. |
6 | (registering two read events on fd 10 and unregistering one will not |
8 | (registering two read events on fd 10 and unregistering one will not |
7 | break the other) |
9 | break the other) |
… | |
… | |
48 | (libevent combines them, but with libev you can combine them yourself |
50 | (libevent combines them, but with libev you can combine them yourself |
49 | by reusing the same callback and still save memory) |
51 | by reusing the same callback and still save memory) |
50 | |
52 | |
51 | - simpler design, backends are potentially much simpler |
53 | - simpler design, backends are potentially much simpler |
52 | (in libevent, backends have to deal with watchers, thus the problems) |
54 | (in libevent, backends have to deal with watchers, thus the problems) |
53 | (epoll backend in libevent: 366 lines, libev: 89 lines, and more features) |
55 | (epoll backend in libevent: 366 lines, libev: 90 lines, and more features) |
54 | |
56 | |
55 | whats missing? |
57 | whats missing? |
56 | |
58 | |
57 | - evdns, evhttp, bufferevent are missing, libev is only an even library at |
59 | - evdns, evhttp, bufferevent are missing, libev is only an even library at |
58 | the moment. |
60 | the moment. |