// name: HelloShred.ck // desc: chuck version of the beavis/butthead program // global flag 1 => int keepgoing; // shred entry point fun void callme( string str ) { // loop while( keepgoing ) { // print <<< str, "" >>>; // wait Std.rand2f(100, 500)::ms => now; } } // spawn shreds spork ~ callme( "heheh heh heheh heh" ); spork ~ callme( "huh huh huhuhuhuh huh" ); // wait 3::second => now; // flag shreds to stop 0 => keepgoing; // print <<< "stopped...", "" >>>;