How to start the threads together?
Context :
I have a class that extends the Threading.Thread class.
However, when I start the threads, it seems to me that they are running sequentially.
Example:
1. Enter the for; Home
2. The first thread is instantiated; Home
3. Execute the "run" method through the "start" method;
4. Wait for the execution to finish - Entire it ;
5. Enter the next iteration of the for;
6. Go back to step 1.
from threading import Thread
class Thread_test(Thread):
def __init__(self):
super().__init__()
def run(self):
''' ALGUMA COISA PARA EXECUTAR'''
for i in range(10):
thread = Thread_test()
thread.start()
thread.join()