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
+22
View File
@@ -0,0 +1,22 @@
#!/usr/bin/env python
from threading import Thread
import random
import time
class SimpleThread(Thread):
def __init__(self, num):
super().__init__() # <1>
self._threadnum = num
def run(self): # <2>
time.sleep(random.randint(1, 3))
print("Hello from thread {}".format(self._threadnum))
for i in range(10):
t = SimpleThread(i) # <3>
t.start() # <4>
print("Done.")