mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 15:01:51 +00:00
stdlib: Update the example in std::comm
Due to a bug in channel destructors this examples fails when logging is off Issue #1155
This commit is contained in:
parent
12f2b4989e
commit
2e8ebb7c27
@ -15,15 +15,14 @@ shared boxes (@T) may not be transmitted across channels.
|
||||
|
||||
Example:
|
||||
|
||||
> use std::task;
|
||||
> use std::comm;
|
||||
> use std::{task, comm, io};
|
||||
>
|
||||
> let p = comm::port();
|
||||
> task::spawn(comm::chan(p), fn (c: chan<str>) {
|
||||
> comm::send(c, "Hello, World");
|
||||
> });
|
||||
>
|
||||
> log comm::recv(p);
|
||||
> io::println(comm::recv(p));
|
||||
|
||||
*/
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user