1
Fork 0

core: New task API

This commit is contained in:
Brian Anderson 2012-02-18 16:34:42 -08:00
parent fbc95ba018
commit 4220dcf1e9
43 changed files with 1037 additions and 843 deletions

View file

@ -11,14 +11,14 @@ fn test_cont() { let i = 0; while i < 1 { i += 1; let x: @int = cont; } }
fn test_ret() { let x: @int = ret; }
fn test_fail() {
fn f() { task::unsupervise(); let x: @int = fail; }
task::spawn {|| f(); };
fn f() { let x: @int = fail; }
task::try {|| f() };
}
fn test_fail_indirect() {
fn f() -> ! { fail; }
fn g() { task::unsupervise(); let x: @int = f(); }
task::spawn {|| g(); };
fn g() { let x: @int = f(); }
task::try {|| g() };
}
fn main() {