mirror of
https://github.com/github/codeql.git
synced 2025-12-20 10:46:30 +01:00
Initial commit of Python queries and QL libraries.
This commit is contained in:
committed by
Mark Shannon
parent
90c75cd362
commit
5f58824d1b
18
python/ql/src/Classes/ConflictingAttributesInBaseClasses.py
Normal file
18
python/ql/src/Classes/ConflictingAttributesInBaseClasses.py
Normal file
@@ -0,0 +1,18 @@
|
||||
|
||||
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
|
||||
Reference in New Issue
Block a user