Shutting down twisted reacotr

Jason Mobarak jason.mobarak at gmail.com
Wed Apr 27 21:36:26 EDT 2005


Why do you want to do this in a thread? What's wrong with
reactor.callLater?

import time
from twisted.internet import reactor

def shutdown():

    time.sleep(3)
    print "stopping"
    reactor.callFromThread(reactor.stop)

reactor.callInThread(shutdown)
reactor.run()




More information about the Python-list mailing list