21 Jul
2005
21 Jul
'05
3:15 p.m.
On Thu, 2005-07-21 at 12:51 +0200, Thomas Vander Stichele wrote:
Hi,
I wanted to have a class hierarchy where .stop methods would make sure everything is cleaned up properly before reactors get stopped and such.
That's what services (twisted.application.service) are for. The stopService method of a service can return a Deferred. Since they're a tree, all you need to do is hook up the root service to the reactor (which is what twistd does for you) and all child services will get shutdown as well.