[Twisted-Python] Reactors

James Y Knight foom at fuhm.net
Thu Nov 18 11:17:12 MST 2004


On Nov 18, 2004, at 11:13 AM, Itamar Shtull-Trauring wrote:
> I suspect the Qt reactor is perfectly fine, and that the main issue is
> with running tests. Like, reactor.iterate() taking way too long or
> something. I don't think these issues will show up when running real
> applications.

But of course, we'd never know, because we have no way to test that.

Apparently self.qApp.processEvents(delay) (what's used in doIteration) 
isn't processing network events. Thus reactor.iterate() doesn't work 
for anything network-related, and nearly every test fails.

Changing doIteration to:
     def doIteration(self, delay=0.0):
         log.msg(channel='system', event='iteration', reactor=self)
         self.callLater(delay, self.crash)
         self.run()

seems to help a lot. But it's still failing a bunch of tests. Perhaps 
this gives someone who wants to maintain qtreactor a head start at 
figuring out how to fix it the rest of the way.

James





More information about the Twisted-Python mailing list