[Twisted-Python] (no subject)

Mattias Brändström mattias.brandstrom at todos.se
Tue Aug 12 11:56:44 EDT 2008


Is there any way I can make twisted stop accepting connections for a short period of time and then start accepting connections? Something like reactor.pause()?

More precisely, what I want to do is to reread my server configuration on SIGHUP (or some other external event). If possible I would like to do this without locking a mutex when accessing (reading or modifying) the configuration info. I figure that reconfiguring the server will be a rare event. So if there is some way that I can:

1. Block incoming requests. Preferable keeping them in the connection queue.
2. Wait for all running requests to complete.
3. Reread the server configuration.
4. Unblock incoming requests. 

What do you think? Is there some simple twisted-way to do this?

If this has been covered in the past, please point me in that direction. :-)


More information about the Twisted-Python mailing list