[Tutor] Closing BaseHTTPServer...
python at venix.com
Sat Jul 16 21:30:49 CEST 2005
This sidesteps the issue of how to fix your threading code.
SocketServer has a ThreadingMixIn class. You can create a threading
HTTPServer without coding the threading yourself.
(watch for typos - this is NOT from working code)
class ThreadingHTTPD(SocketServer.ThreadingMixIn, BaseHTTPServer.HTTPServer):
srvr = ThreadingHTTPD( <address,port tuple>, <request handler class>)
Credit for this goes to John Goerzen and his fine book "Foundations of
Python Network Programming"
More information about the Tutor