Linux 和 I/O 完成端口? [英] Linux and I/O completion ports?
问题描述
使用 winsock,您可以配置套接字或单独的 I/O 操作以重叠".这意味着执行 I/O 的调用会立即返回,而实际操作则由单独的工作线程异步完成.
Using winsock, you can configure sockets or seperate I/O operations to "overlap". This means that calls to perform I/O are returned immediately, while the actual operations are completed asynchronously by separate worker threads.
Winsock 还提供完成端口".据我了解,完成端口充当句柄(套接字)的多路复用器.如果句柄不在 I/O 操作的中间,即如果它的所有 I/O 操作都完成,则可以对其进行多路分解.
Winsock also provides "completion ports". From what I understand, a completion port acts as a multiplexer of handles (sockets). A handle can be demultiplexed if it isn't in the middle of an I/O operation, i.e. if all its I/O operations are completed.
那么,关于我的问题……linux 是否支持套接字的完成端口甚至异步 I/O?
So, on to my question... does linux support completion ports or even asynchronous I/O for sockets?
推荐答案
那么,关于我的问题……linux 是否支持套接字的完成端口甚至异步 I/O?
So, on to my question... does linux support completion ports or even asynchronous I/O for sockets?
关于套接字,在 5.3 及更高版本的内核中,Linux 具有类似于 io_uring<形状的完成端口的东西/code>
(对于文件/块设备 io_uring
支持出现在 5.1 内核中).
With regard to sockets, in 5.3 and later kernels, Linux has something analogous to completion ports in the shape of io_uring
(for files/block devices io_uring
support appeared in the 5.1 kernel).
这篇关于Linux 和 I/O 完成端口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!