libev 与libevent比较
来源:互联网 发布:华为ip地址mac绑定 编辑:程序博客网 时间:2024/05/16 04:59
liWhat's the difference between libev and libevent?
As for design philosophy, libev was created to improve on some of the architectural decisions in libevent, for example, global variable usage made it hard to use libevent safely in multithreaded environments, watcher structures are big because they combine I/O, time and signal handlers in one, the extra components such as the http and dns servers suffered from bad implementation quality and resultant security issues, and timers were inexact and didn't cope well with time jumps.
Libev tried to improve each of these, by not using global variables but using a loop context for all functions, by using small watchers for each event type (an I/O watcher uses 56 bytes on x86_64 compared to 136 for libevent), allowing extra event types such as timers based on wallclock vs. monotonic time, inter-thread interruptions, prepare and check watchers to embed other event loops or to be embedded and so on.
The extra component problem is "solved" by not having them at all, so libev can be small and efficient, but you also need to look elsewhere for an http library, because libev simply doesn't have one (for example, there is a very related library called libeio that does asynchronous I/O, which can be used independently or together with libev, so you can mix and match).
So in short, libev tries to do one thing only (POSIX event library), and this in the most efficient way possible. Libevent tries to give you the full solution (event lib, non-blocking I/O library, http server, DNS client).
Or, even shorter, libev tries to follow the UNIX toolbox philosophy of doing one thing only, as good as possible.
Note that this is the design philosophy, which I can state with authority because I designed libev. Whether these design goals have actually been reached, or whether the philosophy is based on sound principles, is up to you to judge.
- libev 与libevent比较
- libevent/libev/libuv/redisev比较
- 事件驱动库libevent与libev
- libev:libevent的挑战者
- BENCHMARKING LIBEVENT AGAINST LIBEV
- libevent和libev
- libev and libevent
- libev and libevent
- libevent和libev
- libev和libevent区别
- libevent和libev资料
- libev & libevent简介
- libev和libevent的设计差异
- libevent 和 libev 提高网络应用性能
- [译]libev和libevent的设计差异
- 网络库libevent、libev、libuv对比
- 网络库libevent、libev、libuv对比
- 使用 libevent 和 libev 提高网络应用性能
- git基础
- 1014. Waiting in Line (30)-PAT
- PAT_1015: Reversible Primes
- hdu 1195 BFS
- seo追求质量 不要刻意的去求数量
- libev 与libevent比较
- FZU 1015 土地划分
- HDU 1241 Oil Deposits
- 简单的Java IO操作 修改文件名称
- PHP高效率写法(详解原因)
- 黑马程序员----java之内部类
- 完全卸载oracle11g步骤
- c历史
- LEMON的特殊声明符的应用场景及用途总结