
On 02:58 pm, peter.westlake@pobox.com wrote:
I have a Twisted application with several Services. One of them has a startService method that does some setup asynchronously. This can go wrong if the next service to start makes a call to the first one, and it isn't ready yet. One way round it would be to make all methods on the slow service returned a Deferred (e.g. "self.slow_init.addCallback(self.actual_method)", but it seems a shame to have to do that every time when the situation only occurs when the daemon starts up. So would it be possible for t.a.s.Service.startService to be allowed to return a Deferred? Then the next service would only be started up when the Deferred fired.
Probably not. There is some discussion on <https://twistedmatrix.com/trac/ticket/5941>. Jean-Paul