mirror of
https://github.com/github/codeql.git
synced 2025-12-20 02:44:30 +01:00
19 lines
579 B
Python
19 lines
579 B
Python
|
|
class TCPServer(object):
|
|
|
|
def process_request(self, request, client_address):
|
|
self.do_work(request, client_address)
|
|
self.shutdown_request(request)
|
|
|
|
|
|
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."""
|
|
t = threading.Thread(target = self.do_work, args = (request, client_address))
|
|
t.daemon = self.daemon_threads
|
|
t.start()
|
|
|
|
class ThreadingTCPServer(ThreadingMixIn, TCPServer): pass
|