Multiple Threads
This lesson discusses the implementation of the web-service using multiple threads.
We'll cover the following...
Multiple Threads
To mitigate the issues we experienced in the previous section, we'll modify our service to spawn a new thread to deal with each new client request. We can use a ThreadPoolExecutor
to handle new client connections but for now, we'll simply spawn threads ourselves. The required changes are:
def run_service(self):
connection = socket.socket()