[Twisted-Python] Where does the client stop the reactor?

Bill la Forge laforge49 at yahoo.co.in
Sat May 15 08:10:16 EDT 2004


I've noticed that when running an example client, the reactor shuts down 
cleanly, but it does not when running an example server.
 
I've cludged some code for my testing that works fine for now, 
shutting down the reactor when there's no delayed calls:
 
def stopWhenIdle():
    count=len(reactor.getDelayedCalls())
    if count:
        reactor.callLater(1,stopWhenIdle)
    else:
        reactor.stop()

But where does the client normally stop the reactor?
 
Thanks!
 


Bill la Forge
http://www.geocities.com/laforge49/
Yahoo! India Matrimony: Find your partner online.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20040515/23afc72c/attachment.htm 


More information about the Twisted-Python mailing list