mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
update to use threading module instead of thread.
This commit is contained in:
parent
2539451fb9
commit
75260275fe
1 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue