import time
import threading
def start_stop():
while not current_bool.is_set():
time.sleep(1)
print("Цикл все еще работает")
current_bool = threading.Event() # Создание объекта Event
threading.Thread(target=start_stop).start()
time.sleep(3)
current_bool.set()