Fix example code
This commit is contained in:
parent
2a48aef0a8
commit
02de11c1e7
@ -24,14 +24,14 @@ across channels.
|
||||
# Example
|
||||
|
||||
~~~
|
||||
let po = comm::Port();
|
||||
let ch = comm::Chan(po);
|
||||
let po = oldcomm::Port();
|
||||
let ch = oldcomm::Chan(&po);
|
||||
|
||||
do task::spawn {
|
||||
comm::send(ch, "Hello, World");
|
||||
oldcomm::send(ch, ~"Hello, World");
|
||||
}
|
||||
|
||||
io::println(comm::recv(p));
|
||||
io::println(oldcomm::recv(po));
|
||||
~~~
|
||||
|
||||
# Note
|
||||
|
Loading…
Reference in New Issue
Block a user