Convert some comm tests to istrs. Issue #855
These spawn thunks need to take move-mode strings to be correct
This commit is contained in:
parent
e412652f00
commit
d8a833dccd
3 changed files with 8 additions and 8 deletions
|
@ -3,6 +3,6 @@
|
|||
use std;
|
||||
import std::task;
|
||||
|
||||
fn child2(s: str) { }
|
||||
fn child2(s: -istr) { }
|
||||
|
||||
fn main() { let x = task::spawn(bind child2("hi")); }
|
||||
fn main() { let x = task::spawn(bind child2(~"hi")); }
|
||||
|
|
|
@ -4,12 +4,12 @@ use std;
|
|||
import std::task::yield;
|
||||
import std::task;
|
||||
|
||||
fn x(s: str, n: int) { log s; log n; }
|
||||
fn x(s: -istr, n: int) { log s; log n; }
|
||||
|
||||
fn main() {
|
||||
task::spawn(bind x("hello from first spawned fn", 65));
|
||||
task::spawn(bind x("hello from second spawned fn", 66));
|
||||
task::spawn(bind x("hello from third spawned fn", 67));
|
||||
task::spawn(bind x(~"hello from first spawned fn", 65));
|
||||
task::spawn(bind x(~"hello from second spawned fn", 66));
|
||||
task::spawn(bind x(~"hello from third spawned fn", 67));
|
||||
let i: int = 30;
|
||||
while i > 0 { i = i - 1; log "parent sleeping"; yield(); }
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use std;
|
||||
import std::task;
|
||||
fn main() { task::spawn(bind child("Hello")); }
|
||||
fn main() { task::spawn(bind child(~"Hello")); }
|
||||
|
||||
fn child(s: str) {
|
||||
fn child(s: -str) {
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue