- 授权协议: BSD
- 开发语言: Python
- 操作系统: 跨平台
- 软件首页: https://github.com/dabeaz/curio
- 软件文档: https://curio.readthedocs.io/en/latest/
软件介绍
Curio 是 Python 第三方实现的协程库。Python 的并发编程 async/await 是一套接口,允许第三方实现,官方的实现是标准库asyncio。Curio 相比官方的 asyncio 使用起来更简单直观一些。
tcp echo server例子:
from curio import run, tcp_server
async def echo_client(client, addr):
print('Connection from', addr)
while True:
data = await client.recv(100000)
if not data:
break
await client.sendall(data)
print('Connection closed')
if __name__ == '__main__':
run(tcp_server, '', 25000, echo_client)
High Performance Python
Micha Gorelick、Ian Ozsvald / O'Reilly Media / 2014-9-10 / USD 39.99
If you're an experienced Python programmer, High Performance Python will guide you through the various routes of code optimization. You'll learn how to use smarter algorithms and leverage peripheral t......一起来看看 《High Performance Python》 这本书的介绍吧!
