1
Fork 0

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:
Brian Anderson 2011-11-10 15:18:01 -08:00
parent 12f2b4989e
commit 2e8ebb7c27

View file

@ -15,15 +15,14 @@ shared boxes (@T) may not be transmitted across channels.
Example: Example:
> use std::task; > use std::{task, comm, io};
> use std::comm;
> >
> let p = comm::port(); > let p = comm::port();
> task::spawn(comm::chan(p), fn (c: chan<str>) { > task::spawn(comm::chan(p), fn (c: chan<str>) {
> comm::send(c, "Hello, World"); > comm::send(c, "Hello, World");
> }); > });
> >
> log comm::recv(p); > io::println(comm::recv(p));
*/ */