22 lines
287 B
Rust
22 lines
287 B
Rust
import task::*;
|
|
import comm::*;
|
|
|
|
class test {
|
|
let f: int;
|
|
new(f: int) { self.f = f; }
|
|
drop {}
|
|
}
|
|
|
|
fn main() {
|
|
let p = port();
|
|
let c = chan(p);
|
|
|
|
spawn() {||
|
|
let p = port();
|
|
c.send(chan(p));
|
|
|
|
let _r = p.recv();
|
|
}
|
|
|
|
p.recv().send(test(42));
|
|
} |