摘要:
1 以线程安全模式运行代码 Twisted中大部分代码都不是线程安全例如protocol向transport写入数据就不是线程安全因此我们需要种思路方法来在主事件循环中进行调度者可以使用twisted.ernet.erfaces.IReactorThreads.callFromThread 来实现:from twisted.ernet import reactordef notThreadSafe(x): """做些非线程安全事情""" # ...def threadSafeScheduler: """以 阅读全文
posted @ 2012-05-23 17:37
很多不懂呀。。
阅读(2255)
评论(1)
推荐(0)

浙公网安备 33010602011771号