[PEAK] Problems with events.twisted_support

Phillip J. Eby pje at telecommunity.com
Thu Feb 5 19:15:24 EST 2004


At 04:01 PM 2/5/04 -0800, John Landahl wrote:
>Ok, it looks like the "self.reactor.crash()" isn't doing the trick.
>Replacing "crash" with "stop" does seem to work, however.

No, don't do that.  If you're using runUntil you don't really want to use 
reactor.stop(), AFAICT.  reactor.stop() fires a bunch of shutdown events, 
even though all you're really doing is pausing the reactor.  If you really 
want the shutdown events, you should call reactor.stop() directly.  It's 
outside of runUntil's jurisdiction to cause those Twisted shutdown events 
to be run.

What you want instead is to simply not call reactor.run() if the event has 
already fired.




More information about the PEAK mailing list