summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>1999-10-12 16:20:13 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>1999-10-12 16:20:13 (GMT)
commit75260275fe3bcc5d177a1b3ff30fd60681809585 (patch)
treea9a626ede339b906d801ae3a350b022b9d1c2cef /Lib
parent2539451fb9ca2cb0828ee10a91ef1ef688670eb3 (diff)
downloadcpython-75260275fe3bcc5d177a1b3ff30fd60681809585.zip
cpython-75260275fe3bcc5d177a1b3ff30fd60681809585.tar.gz
cpython-75260275fe3bcc5d177a1b3ff30fd60681809585.tar.bz2
update to use threading module instead of thread.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/SocketServer.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/SocketServer.py b/Lib/SocketServer.py
index f7da84f..2c73356 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