summaryrefslogtreecommitdiff
path: root/Lib/SocketServer.py
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>1999-10-12 16:20:13 +0000
committerJeremy Hylton <jeremy@alum.mit.edu>1999-10-12 16:20:13 +0000
commit2081340649cb0b27ec3e38919e1e538c73f767ce (patch)
tree50fd012642a40cea4ddae8848e9372c1720965b2 /Lib/SocketServer.py
parent57a01673ded3e8c7dbc73ec36575c993e6fe56e5 (diff)
downloadcpython-2081340649cb0b27ec3e38919e1e538c73f767ce.tar.gz
update to use threading module instead of thread.
Diffstat (limited to 'Lib/SocketServer.py')
-rw-r--r--Lib/SocketServer.py8
1 files changed, 4 insertions, 4 deletions
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