How to kill a SocketServer?

Skip Montanaro skip at pobox.com
Sun May 1 19:25:40 EDT 2005


    >> I use precisely that scheme with (I think *) no problem.  The only
    >> maybe significant difference I see is that I subclass ThreadingMixin
    >> so that it creates daemon threads: ...

    Paul> According to the docs, you don't need the subclass, you can just
    Paul> set the "daemon_threads" property on the server, e.g.
    ...

It's possible that my subclassing existed before this feature was available
(it's been in use for about 5 years now) or that I just missed that
mechanism.

    >> (*) Maybe my XML-RPC server actually accepts one more connection
    >> after I set server.shutdown to True before it actually exits.  I'll
    >> have to take a look at that.

    Paul> Yes, this is precisely what I'm asking.  How do you get the server
    Paul> to go away without going out of your way to connect to it again?
    Paul> Don't you notice if it stays around?

It fields lots of requests, so it's possible that another request arrives
after I exit, but I don't think that's the case.  I'll try to take a look in
isolation when I have a moment.

Skip



More information about the Python-list mailing list