[Twisted-Python] Asynchronously initializing objects in twisted.web?
Phil Mayers
p.mayers at imperial.ac.uk
Tue Sep 8 10:07:15 MDT 2015
On 08/09/15 15:51, Nagy, Attila wrote:
> The goal here is that the HTTP server shouldn't start until it can fetch
> the desired data. Of course I can do this in a synchronous way, but it
> feels so unnatural and bad practice to fetch the same stuff
Load the resources in a callback using "reactor.callWhenRunning" and
only then call reactor.listenTCP or whatever.
More information about the Twisted-Python
mailing list