Try with enabling the sub-thread as daemon-thread.
Recommended:
from threading import Thread
t = Thread(target=<your-method>)
t.daemon = True # This thread dies when main thread (only non-daemon thread) exits.
t.start()
Inline:
t = Thread(target=<your-method>, daemon=True).start()
Old API:
t.setDaemon(True)
t.start()
When your main thread terminates ("i.e. when I press Ctrl+C"), other threads will also be killed by the instructions above.