SV: [Twisted-Python] Temporarily blocking connections

Mattias Brändström mattias.brandstrom at todos.se
Wed Aug 13 03:02:59 EDT 2008


Ops. I missed the subject. This should make things a little crearer.

> -----Ursprungligt meddelande-----
> Från: twisted-python-bounces at twistedmatrix.com [mailto:twisted-python-
> bounces at twistedmatrix.com] För Mattias Brändström
> Skickat: den 12 augusti 2008 17:57
> Till: twisted-python at twistedmatrix.com
> Ämne: [Twisted-Python] (no subject)
> 
> Hello!
> 
> 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.
> :-)
> 
> Regards,
> Mattias
> 
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python




More information about the Twisted-Python mailing list