When do the threads in python die if the method thread.stop() or thread.join() is not called?
问题 Here is a snippet of code: def display(): threading.Timer(1,display).start() print("Number") display() For this code I want to ask the following things: Every second new thread spawns, is that right? Every second the last thread dies because the function executes completely so the older thread dies, is that right? If not then what is happening? 回答1: Timer derives from Thread , so yes: many threads are started. Threads die when their invoked functions return (or throw) whether or not you call