#5941 enhancement new
facilitate dependency between service state at startService time
|Reported by:||teratorn||Owned by:|
It is often desirable to initiate a controlled, asynchronous start-up of a Service, or MultiService collection. E.g. a database may need to be contacted before the Service can be considered "started".
To accommodate this, startService() and privilegedStartService() could be documented as returning None, or a Deferred.
Twisted code that consumes Service objects should be enhanced to support the extended interface, and chain the Deferred, or otherwise take an appropriate action to propogate the startup result.
By default, I think MultiService.startService()'s Deferred should errback if any of the child Service objects errback, as consistent with the current case of synchronous startup (and synchronous Python exceptions).
Change History (5)
comment:2 Changed 2 years ago by glyph
- Summary changed from Support asynchronous Service startup-up - startService() may return a Deferred to facilitate dependency between service state at startService time