Windows 上的 Libev

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8042796/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 18:24:57  来源:igfitidea点击:

Libev on Windows

c++windowslibeventlibev

提问by Cartesius00

Considering libeventvs. libev. Does the libevlibrary have native support of IOCP on Windows?

考虑libeventlibev. 该libev库是否在 Windows 上原生支持 IOCP?

回答by Remember Monica

both libev and libevent use select on windows to detect and dispatch events (the event core doesn't do I/O, only events).

libev 和 libevent 都在 windows 上使用 select 来检测和调度事件(事件核心不执行 I/O,只执行事件)。

libevent in addition has a socket handle abstraction, which uses iocps on windows to do reads and writes. libev doesn't have anything comparable. the benchmarks seen so far indicate that the iocp backend of libevent is not very fast though, so if you are looking for fast on windows, you better do your own I/O at this point.

此外,libevent 有一个套接字句柄抽象,它在 windows 上使用 iocps 进行读写。libev 没有任何可比的东西。到目前为止看到的基准测试表明 libevent 的 iocp 后端不是很快,所以如果你在 Windows 上寻找快速,你最好在这一点上做你自己的 I/O。

回答by Akzhan Abdulin

Take a look at libuv, yet another implementation of event loop. It supports IOCP and other backends.

看看libuv,这是事件循环的另一个实现。它支持 IOCP 和其他后端。

This is robust because used by Node.JS.

这是健壮的,因为被 Node.JS 使用。

回答by nos

No, ituses select() , just as libevent does.

不,使用select() ,就像 libevent 一样。