开发者

Blocking vs. Non Blocking network IO in Python

I have some python code that was written by a developer before me. I开发者_开发知识库t sends UDP messages to nodes in a P2P network. I am writing a parallel version of that code. This code sends multiple parallel messages to the P2P network. Unfortunately, the code is consuming too much CPU. I am assuming it is because of all the network I/O polling. Will it be a good idea if I used asynchronous I/O (twisted framework)?


Yes.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜