<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi,
    <p>I found out that running() always return the value 0, doesn't
      matter if the shred is actually running or not. done() instead
      seems to work fine.<br>
      I tried on my Linux machine running Ubuntu Studio 16.04 using
      ChucK 1.4.0.0.</p>
    <p>Here's a little script that shows the issue:</p>
    <pre>0 =&gt; int c;</pre>
    <pre>
spork ~ loop() @=&gt; Shred parallel;</pre>
    <pre>
//---------MAIN---------</pre>
    <pre>while( c &lt; 5 )</pre>
    <pre>{</pre>
    <pre>    &lt;&lt;&lt; "running(): " + parallel.running() + "\t||\t " + </pre>
    <pre>        "done(): " + parallel.done() &gt;&gt;&gt;;</pre>
    <pre>    if( c == 2 )</pre>
    <pre>    {</pre>
    <pre>        &lt;&lt;&lt; "exiting the shred" &gt;&gt;&gt;;</pre>
    <pre>        parallel.exit();</pre>
    <pre>    }</pre>
    <pre>    </pre>
    <pre>    c++;</pre>
    <pre>    </pre>
    <pre>    0.5::second =&gt; now;</pre>
    <pre>}</pre>
    <pre>
//-------FUNCTIONS--------</pre>
    <pre>function void loop()</pre>
    <pre>{</pre>
    <pre>    while( true )</pre>
    <pre>    {</pre>
    <pre>        333::ms =&gt; now;</pre>
    <pre>    }</pre>
    <pre>}</pre>
    <p><br>
    </p>
    <p>Cheers,</p>
    <p>Mario<br>
    </p>
    <p><br>
    </p>
    <pre class="moz-signature" cols="72">-- 
Electronic Musician, Creative Coder, QA Engineer
<a class="moz-txt-link-freetext" href="https://vimeo.com/creativecodingsalerno">https://vimeo.com/creativecodingsalerno</a>
<a class="moz-txt-link-freetext" href="http://mbuoninfante.tumblr.com/">http://mbuoninfante.tumblr.com/</a>
<a class="moz-txt-link-freetext" href="https://github.com/mariobuoninfante">https://github.com/mariobuoninfante</a>
<a class="moz-txt-link-freetext" href="https://bitbucket.org/mariobuoninfante/">https://bitbucket.org/mariobuoninfante/</a></pre>
  </body>
</html>