ITeye博客

Reactor在twisted中的作用

huangro · 2008-11-14 17:02 · Python · 网络应用 · Markdown

首先,引用官方文档中的解释:

The reactor is Twisted's main event loop. There is exactly one reactor in any running Twisted application. Once started it loops over and over again, responding to network events, and making scheduled calls to code.

也就是说reactor是twisted中主要的事件循环。每个twisted应用都必须要使用一个reactor,当它启动之后就会不停地进行循环操作,对网络事件进行响应,并对程序进行调度。

未完待续...

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。