I do not really understand the multithreading in Python, therefore I need the advice of a person who can tell me the most efficient and the most correct variant of multithreading from the point of view of organizing flows.
As I did before. For example, I have a function to send an http request:
def http_request(): #тело функции class HTTPThread(threading.Thread): def run(self): try: http_request() except Exception, ex: pass for i in range(5): while True: t = HTTPThread() t.start()
How correct or incorrect is this way to implement multithreading?