title: perl threads: is_joinable vs is_running
body: <pre><code>while ($thr-&gt;is_running() {
      # do something
  }
  </code></pre>
  
  <p>vs</p>
  
  <pre><code>while (! $thr-&gt;joinable()) {
      # do something
  }
  </code></pre>
  
  <p>Is there any difference between the two?<br>
  When would a programmer use one over the other and vice versa?  </p>
  
  <p>I am assuming you cant join a thread if it's running so arent they basically the same thing? </p>
  
  <p>If so, why does perl provides two different ways to check the status of a thread?</p>