[chuck-users] running() doesn't return status of the shred

mario buoninfante mario.buoninfante at gmail.com
Thu Jan 3 13:54:56 EST 2019


Hi,

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.
I tried on my Linux machine running Ubuntu Studio 16.04 using ChucK 1.4.0.0.

Here's a little script that shows the issue:

0 => int c;

spork ~ loop() @=> Shred parallel;

//---------MAIN---------

while( c < 5 )

{

     <<< "running(): " + parallel.running() + "\t||\t " +

         "done(): " + parallel.done() >>>;

     if( c == 2 )

     {

         <<< "exiting the shred" >>>;

         parallel.exit();

     }

     

     c++;

     

     0.5::second => now;

}

//-------FUNCTIONS--------

function void loop()

{

     while( true )

     {

         333::ms => now;

     }

}


Cheers,

Mario


-- 
Electronic Musician, Creative Coder, QA Engineer
https://vimeo.com/creativecodingsalerno
http://mbuoninfante.tumblr.com/
https://github.com/mariobuoninfante
https://bitbucket.org/mariobuoninfante/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20190103/82e4ceff/attachment.html>


More information about the chuck-users mailing list