Commit 20813406 authored by Jeremy Hylton's avatar Jeremy Hylton

update to use threading module instead of thread.

parent 57a01673
...@@ -325,14 +325,14 @@ class ForkingMixIn: ...@@ -325,14 +325,14 @@ class ForkingMixIn:
class ThreadingMixIn: class ThreadingMixIn:
"""Mix-in class to handle each request in a new thread.""" """Mix-in class to handle each request in a new thread."""
def process_request(self, request, client_address): def process_request(self, request, client_address):
"""Start a new thread to process the request.""" """Start a new thread to process the request."""
import thread import threading
thread.start_new_thread(self.finish_request, t = threading.Thread(target = self.finish_request,
(request, client_address)) args = (request, client_address))
t.start()
class ForkingUDPServer(ForkingMixIn, UDPServer): pass class ForkingUDPServer(ForkingMixIn, UDPServer): pass
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment