From: Jeremy Hylton Date: Tue, 12 Oct 1999 16:20:13 +0000 (+0000) Subject: update to use threading module instead of thread. X-Git-Tag: v1.6a1~824 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=75260275fe3bcc5d177a1b3ff30fd60681809585;p=python update to use threading module instead of thread. --- diff --git a/Lib/SocketServer.py b/Lib/SocketServer.py index f7da84f557..2c7335698b 100644 --- a/Lib/SocketServer.py +++ b/Lib/SocketServer.py @@ -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