Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使用Dave Beazley 的 curio 库创建异步命名管道服务器?如果不是那个,是否有任何库比 Python 的默认 asyncio 库更快和/或更直观,我可以轻松地编写异步命名管道服务器?
嗯,答案似乎是,现在,你不知道。您可以使用 Python 的内置功能来做到这一点asyncio,但前提是您将asyncio.windows_events.ProactorEventLoop其用作事件循环。而且那个事件循环也不能处理标准输入和标准输出,所以如果你的程序需要保持对用户输入的响应,你就不得不使用两个线程。
asyncio
asyncio.windows_events.ProactorEventLoop