new test for mp

This commit is contained in:
2018-05-17 21:44:45 +02:00
parent 32828d3a65
commit f78ddbc005
8 changed files with 324 additions and 25 deletions
+17
View File
@@ -0,0 +1,17 @@
#import threading
import multiprocessing
import time
class MyThread(threading.Thread):
def run(self):
time.sleep(5)
return
if __name__ == '__main__':
for i in range(3):
t = MyThread()
t.start()
print(t.name, 'is alive -> ',t.is_alive())
t.join()
print(t.name, 'is alive -> ',t.is_alive())