diff --git a/Uptated-Prototype/Threading-test.py b/Uptated-Prototype/Threading-test.py new file mode 100644 index 0000000..a0e6b6d --- /dev/null +++ b/Uptated-Prototype/Threading-test.py @@ -0,0 +1,27 @@ +import threading +import time + +codedone = False + +def TestThreadOne(): + input("Press Enter to Quit?\n") + codedone = True + +def TestThreadTwo(): + testcounter = 0 + while not codedone: + time.sleep(1) + testcounter += 1 + print(testcounter) + if testcounter >= 30 + break + +t1 = threading.Thread(target=TestThreadOne, daemon=False) +t2 = threading.Thread(target=TestThreadTwo, daemon=True) + +t1.start() +t2.start() +# t1.join() +# t2.join() + +print("Done!") \ No newline at end of file