title: Stop a main thread from child thread
body: <p>I am writing a python program, In main function I am starting a thread which runs continuously. After starting the the thread the main function enters a while loop where it takes user input continuously. If there is a exception in child thread I want to end the main function also. What is the best way to do that?  </p>
  
  <p>Thanks in advance</p>