[chuck-users] Does a Std.system call block concurrency?

federico lopez fede2001 at gmail.com
Thu Dec 31 06:32:54 EST 2020

Is the ChucK thread disrupted by the execution time of a Std.system script

In the code below, sporking a fast script, e.g. Std.system("sleep 0"),
there is no noticeable disruption,  but sporking a time consuming version
e.g. Std.system("sleep 3") there is a disruption in the other sporks.

I'm trying to call R scripts using ChucK concurrency.

// test code, run with --caution-to-the-wind command-line flag
Noise n => Envelope e => dac;

fun void metro()
        10::ms => now;
        990::ms => now;
        <<< now, "samples" >>>;

fun void callSystem()
        Std.system("sleep 0"); // comment this to test
        //Std.system("sleep 3"); // uncomment this to test
        1000::ms => now;

spork~ metro();
spork~ callSystem();
while(true){10::ms => now;}

// end test code
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20201231/9a175189/attachment.html>

More information about the chuck-users mailing list