[Twisted-Python] cleanup

Itamar Shtull-Trauring itamar at itamarst.org
Wed Apr 20 09:59:37 EDT 2005


On Wed, 2005-04-20 at 04:38 -0700, Joachim Boomberschloss wrote:
> Hi,
> 
> There was a discussion here recently about registering
> a callback to be called prior to shutdown (using
> addSystemEventTrigger), and I just wanted to ask, what
> does Twisted allow before shutdown, and what gets
> stopped in the middle; ex. if I want to do something
> prior to shutdown that involves communication with
> some server, and hence a deffered chain, how do I make
> sure that it gets a chance to happen?

You can return a Deferred from your shutdown function and Twisted will
wait until it's got a result before shutting down.





More information about the Twisted-Python mailing list