title: Python: when does a thread terminate? Oviously not (immediately) at return
body: <p>I am using a <code>threading.Thread()</code> that does its job and <code>return</code>s.
  Its return is documented in a print statement, so I am sure that
  this happens. However, relying on <code>threading.active_count()</code> and <code>threading.enumerate()</code> the thread remains active! </p>
  
  <p>Besides from joining the thread from the <code>MainThread</code>, is there 
  anything else that can be done from within the thread to 
  safely terminate?</p>