Converted two more spawn tests.
This commit is contained in:
parent
b9f1f77622
commit
7ad13392bd
2 changed files with 11 additions and 3 deletions
|
|
@ -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"));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue