[Twisted-Python] reactor.running?

Andrew Bennetts andrew-twisted at puzzling.org
Sun Jul 21 22:57:32 MDT 2002


One thing that seems to be missing since the move to reactors is
twisted.internet.main.running -- a flag you can check to see if the
reactor is running or not.

I notice that at least the default reactor has a .running attribute.
Should I use this?  Should it be documented?

I suspect that I actually want a different solution to my problem.
Here's the situation:  I have called clientTCP to connect a Protocol to
a remote server.  I want the ClientFactory to *not* start a new protocol
if the reactor is shutting down (which it currently does, because the
shutdown process closes the connected Protocol, triggering a
reconnect...).

Thoughts?

-Andrew.





More information about the Twisted-Python mailing list