1t1 = Thread(target=call_script, args=(scriptA + argumentsA))
2t2 = Thread(target=call_script, args=(scriptA + argumentsB))
3t3 = Thread(target=call_script, args=(scriptA + argumentsC))
4
5t1.start()
6t2.start()
7t3.start()
8
9# join() stalls program execution until the thread stops executing
10t1.join()
11t2.join()
12t3.join()
1import threading
2import time
3
4def loop1_10(timeSleep):
5 for i in range(1, 11):
6 time.sleep(timeSleep)
7 print("timeSleep:"+str(timeSleep)+": ",i)
8
9t1 = threading.Thread(target=loop1_10, args=[1])
10t2 = threading.Thread(target=loop1_10, args=[2])
11t3 = threading.Thread(target=loop1_10, args=[0.5])
12
13t1.start()
14t2.start()
15t3.start()
16
17t1.join()
18t2.join()
19t3.join()
20
21print("All thread is done !!!")