Hi,
Is the ChucK thread disrupted by the execution time of a Std.system script call?
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()
{
while(true)
{
e.keyOn();
10::ms => now;
e.keyOff();
990::ms => now;
<<< now, "samples" >>>;
}
}
fun void callSystem()
{
while(true)
{
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