Converted two more spawn tests.

This commit is contained in:
Eric Holk 2011-08-12 17:03:48 -07:00
parent b9f1f77622
commit 7ad13392bd
2 changed files with 11 additions and 3 deletions

View file

@ -7,9 +7,14 @@
use std;
import std::str;
import std::comm;
import std::task;
type ctx = chan[int];
type ctx = comm::chan_t[int];
fn iotask(cx: ctx, ip: str) { assert (str::eq(ip, "localhost")); }
fn main() { let p: port[int] = port(); spawn iotask(chan(p), "localhost"); }
fn main() {
let p = comm::mk_port[int]();
task::_spawn(bind iotask(p.mk_chan2(), "localhost"));
}

View file

@ -1,6 +1,9 @@
// -*- rust -*-
fn main() { spawn child(10, 20, 30, 40, 50, 60, 70, 80, 90); }
use std;
import std::task::_spawn;
fn main() { _spawn(bind child(10, 20, 30, 40, 50, 60, 70, 80, 90)); }
fn child(i1: int, i2: int, i3: int, i4: int, i5: int, i6: int, i7: int,
i8: int, i9: int) {