I think it has something to do with this bug about spork returning
Shreds. This works:
fun void foo() {
while( true ) {
1::second => now;
<<< "hi, I'm foo." >>>;
}
}
// okay...
spork ~ foo() @=> Shred s;
while( true ) {
while( true ) {
1::second => now;
<<< "s.id = ", s.id() >>>;
}
}
However, this crashes chuck:
fun void foo() {
while( true ) {
1::second => now;
<<< "hi, I'm foo." >>>;
}
}
// not okay...
Shred s;
spork ~ foo() @=> s;
while( true ) {
while( true ) {
1::second => now;
<<< "s.id = ", s.id() >>>;
}
}
I ran into this a while back. It worked with the previous version of
chuck, but not the latest.
-Mike
On Sat, Jan 24, 2009 at 2:12 PM, Kassen
Mike said;
I'm not sure why you wanted the "new Shred" instantiation there... I think instantiation is implicit.
I think it was a attempt to get around the issue with instantiating non-primitive static objects.
It's not clear to me why your version would work or why Atte's original one used to work in the last version of ChucK; Shreds aren't primitives. It's cool that it does work now but but I don't understand why this is a exception.
Yours, Kas.
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users