[Twisted-Python] Is there a recommended way for a Service to request Application stop?

Daniel Sutcliffe dansut at gmail.com
Mon Oct 10 10:41:59 MDT 2016


I have a hierarchy of Services some of which is MultiService and other
parts are my own implementations of IServiceCollection - in some
situations the a child Service may want to 'suggest' that the
Application's job is done (error, or simply task completed) and I'm
looking for some sort of standardized way to pass this info upstream.
The idea being that I may using my implemented Services in a variety
of Applications.

In this type of situation, is it the general intention a child Service
would use the Application directly, such that potential StopService()s
could bubble down? Or is there a normal pattern here to have messages
bubble up through the Services hierarchy? I'm not seeing anything like
this in the examples I've found or looking through the sources, but
I'm probably missing something.

Cheers
/dan
-- 
Daniel Sutcliffe <dansut at gmail.com>



More information about the Twisted-Python mailing list