Atte,
This seems to work:
public class Time {
static Shred @ ticker_shred;
public static void start(){
spork ~ ticker() @=> ticker_shred;
}
public static void ticker(){
while(true){
1::ms => now;
}
}
}
Time dummy;
dummy.start();
100::week => now;
I'm not sure why you wanted the "new Shred" instantiation there... I
think instantiation is implicit.
Cheers,
Mike
On Sat, Jan 24, 2009 at 9:57 AM, Atte André Jensen
Hi
I'm trying to make my huge live-thingy run under 1.2.1.2. I've narrowed the first problem down to the following code, that runs fine in 1.2.1.1b but segfaults in 1.2.1.2. Any input on what's changed and how to make the sniplet work in 1.2.1.2 would be greatly appreciated!
public class Time { new Shred @=> static Shred @ ticker_shred; public static void start(){ spork ~ ticker() @=> ticker_shred; } public static void ticker(){ while(true){ 1::ms => now; } } } Time dummy; dummy.start(); 100::week => now;
Thank in advance for any feedback.
-- Atte
http://atte.dk http://modlys.dk _______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users