[Twisted-Python] Defer until a server is ready?
Russell E. Owen
rowen at uw.edu
Mon Oct 21 16:08:56 MDT 2013
For unit testing and other reasons I would like to launch a server in a
subprocess, then wait until it is available before running some code
that uses it. Is there a standard paradigm for this, e.g. poll until a
connection is accepted, or have the server emit some kind of "ready"
signal (such as a message to stdout or a UDP packet)? Any advice would
be appreciated. A web search didn't turn up anything.
In some cases we have used one reactor to run both the server or servers
and the client, in which case waiting is trivial. But we have cases
where we would much rather run the server in a separate process.
-- Russell
More information about the Twisted-Python
mailing list