擅长:python、mysql、java
<p>如果您使用的是python3.4或更新版本,则标准库中有<code>selectors</code>模块。它将使用您的系统提供的“最佳”I/O多路复用实现(select、poll、kqueue…)在文档页的末尾有一个简单的echo服务器示例<a href="https://docs.python.org/3/library/selectors.html" rel="nofollow noreferrer">https://docs.python.org/3/library/selectors.html</a></p>
<p>对于旧的Python版本也有一个<a href="https://pypi.python.org/pypi/selectors34" rel="nofollow noreferrer">backport</a>。在</p>