Added threading example.

This commit is contained in:
cheezedoodle2
2023-04-06 17:02:42 -07:00
parent 71b9966e36
commit c610762522
+19
View File
@@ -0,0 +1,19 @@
from threading import Thread
from time import sleep
import tkinter as tk
def hello():
i = 1
while i < 10:
print(f"Hello {i}")
i += 1
sleep(1)
t1 = Thread(target = hello)
t2 = Thread(target = hello)
#t1.start()
#t2.start()
tk.Tk()
sleep(10)