I running 2 thread in python and execute the function Do().
import sys, threading
def do():
print ("Execute")
def run():
def start_thread():
thread = threading.Thread(target = do)
thread.start()
thread.join()
return thread
t1 = start_thread()
t2 = start_thread()
run()
print('Press enter to Quit')
sys.stdin.readline()
After running the run() function, the threads t1 and t2 are out of scope. But, according to VS-Code, they are still in Running mode.
I wait for them to join(). This mean that they are terminated. So, how they are still running? How to release those threads safely?

jointhe first thread beforestarting second thread.