Skip to content

@doublec /gist:3122131
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
staload "contrib/task/SATS/task.sats"
dynload "contrib/task/DATS/task.dats"
fn do_main (sch: scheduler) = begin
set_global_scheduler (sch);
task_spawn (16384, lam () => begin
print ("hello\n");
task_yield ();
print ("world\n")
end);
task_spawn (16384, lam () => begin
task_spawn (16384, lam () => begin
print ("Task start\n");
task_yield ();
print ("Task end\n")
end);
print ("Test1\n");
task_yield ();
print ("Test2\n")
end);
run_global_scheduler ();
unset_global_scheduler (sch);
scheduler_free (sch)
end
implement main (argc, argv) = do_main (scheduler_new ())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.