initial creation

This commit is contained in:
2025-05-20 11:57:43 -04:00
commit c98b612926
8447 changed files with 1862526 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
#!/usr/bin/env python
import threading
import random
import time
def doit(num): # <1>
time.sleep(random.randint(1, 3))
print("Hello from thread {}".format(num))
for i in range(10):
t = threading.Thread(target=doit, args=(i,)) # <2>
t.start() # <3>
print("Done.") # <4>