]> granicus.if.org Git - python/commitdiff
update to use threading module instead of thread.
authorJeremy Hylton <jeremy@alum.mit.edu>
Tue, 12 Oct 1999 16:20:13 +0000 (16:20 +0000)
committerJeremy Hylton <jeremy@alum.mit.edu>
Tue, 12 Oct 1999 16:20:13 +0000 (16:20 +0000)
Lib/SocketServer.py

index f7da84f5575a1fa28fb1c60cf68679f0565584bd..2c7335698be2de814910a808ec86985d929f42b9 100644 (file)
@@ -325,14 +325,14 @@ class ForkingMixIn:
 
 
 class ThreadingMixIn:
-
     """Mix-in class to handle each request in a new thread."""
 
     def process_request(self, request, client_address):
         """Start a new thread to process the request."""
-        import thread
-        thread.start_new_thread(self.finish_request,
-                                (request, client_address))
+        import threading
+        t = threading.Thread(target = self.finish_request,
+                             args = (request, client_address))
+        t.start()
 
 
 class ForkingUDPServer(ForkingMixIn, UDPServer): pass