That is because your subclaases of Thread do not do anything. See
threading — Thread-based parallelism — Python 3.11.5 documentation[
^], for the correct way of implementing this.
Your class should be something along the lines of:
class thread1(Thread):
def run(self):
while True:
print('running ...')
time.sleep(2)
if input('continue? ') == 'n':
break;
t1 = thread1()
t1.start()
And must include the overload of the
run
method.