import threading
import time

def target():
	try:
		time.sleep(3)
	finally:
		print('Doing important cleanup')

t = threading.Thread(target=target)
t.daemon=True
t.start()

print('Oops, no cleanup.')