[Twisted-Python] reactor.callLater() or reactor.callFromThread() when sending msg just before quit

Gabriel Rossetti gabriel.rossetti at arimaz.com
Tue Dec 8 07:50:47 EST 2009

Hello everyone,

I have to send a message just before my service quits, but sometimes the 
reactor quits before the msg is sent.
I was wondering if I should user reactor.callLater like so :

reactor.callLater(1, self.stop)

(which I don't really like), or use reactor.callFromThread like so :


(self.stop calls reactor.stop at some point).

I really need for that msg to be sent before the reactor shuts down.

Thank you,

More information about the Twisted-Python mailing list