Python中select模块的不同功能(如select()、poll()、epoll())在哪些操作系统上可用?

2024-03-28 09:41:16 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图在Windows上使用poll()函数,这时我意识到Windows上只支持select()函数,我相信Linux上支持poll()。 有谁能帮我弄清楚在什么操作系统上支持select模块的哪些功能?你知道吗

谢谢


Tags: 模块函数功能linuxwindowsselect意识poll
1条回答
网友
1楼 · 发布于 2024-03-28 09:41:16

从pythonselect文档中:

This module provides access to the select() and poll() functions available in most operating systems, epoll() available on Linux 2.5+ and kqueue() available on most BSD. Note that on Windows, it only works for sockets; on other operating systems, it also works for other file types (in particular, on Unix, it works on pipes). It cannot be used on regular files to determine whether a file has grown since it was last read.

相关问题 更多 >