Re: Slow termination of process

2012-03-27 Thread Chris Angelico
On Wed, Mar 28, 2012 at 1:52 AM, Roland Hedberg wrote: > So, I went for the low-hanging fruit and defined my own TCPServer class > > class MyTCPServer(SocketServer.TCPServer): >    def __init__(self, server_address, RequestHandlerClass): >        self.allow_reuse_address = True >        SocketServ

Re: Slow termination of process

2012-03-27 Thread Roland Hedberg
So, I went for the low-hanging fruit and defined my own TCPServer class class MyTCPServer(SocketServer.TCPServer): def __init__(self, server_address, RequestHandlerClass): self.allow_reuse_address = True SocketServer.TCPServer.__init__(self, server_address,

Re: Slow termination of process

2012-03-27 Thread Chris Angelico
On Wed, Mar 28, 2012 at 12:03 AM, Roland Hedberg wrote: > When the main script is done it closes down the HTTP server by doing: > >    op.terminate() > > The problem I have is that if the main script is run again almost immediate > then the old HTTP server > process doesn't seem to have released

Slow termination of process

2012-03-27 Thread Roland Hedberg
Hi! I have an application/a script that is run from another application. The script is mostly working as a HTTP client but in some cases it also has to act as a HTTP server. Basically just for serving a few files. The files are dynamically created by the script when needed. To accomplish this I