core: New task API
This commit is contained in:
parent
fbc95ba018
commit
4220dcf1e9
43 changed files with 1037 additions and 843 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue