Python убить все нити
#setting thread as a daemon thread
import threading
import time
import sys
def exfu():
while True:
time.sleep(0.5)
print('Thread alive, but it will die on program termination')
x = threading.Thread(target=exfu)
x.daemon = True
x.start()
time.sleep(2)
sys.exit()
ykk