about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorŁukasz Niemier <lukasz@niemier.pl>2015-04-07 21:46:14 +0200
committerŁukasz Niemier <lukasz@niemier.pl>2015-04-07 21:46:14 +0200
commit4695bf070585ec74c3c7fb396c11b4f728f6866a (patch)
treee2547262b1b4a6da55e084278bf15b6fadbf1b66 /src
parent4cf59304c1e112c3b0fbedc6034b2a469fb9fce8 (diff)
downloadrust-4695bf070585ec74c3c7fb396c11b4f728f6866a.tar.gz
rust-4695bf070585ec74c3c7fb396c11b4f728f6866a.zip
Remove another invalid example
Diffstat (limited to 'src')
-rw-r--r--src/libstd/sync/mpsc/mod.rs26
1 files changed, 0 insertions, 26 deletions
diff --git a/src/libstd/sync/mpsc/mod.rs b/src/libstd/sync/mpsc/mod.rs
index a955f88164c..e5444843516 100644
--- a/src/libstd/sync/mpsc/mod.rs
+++ b/src/libstd/sync/mpsc/mod.rs
@@ -112,32 +112,6 @@
 //! });
 //! rx.recv().unwrap();
 //! ```
-//!
-//! This second example is more costly since it allocates a new timer every
-//! time a message is received, but it allows you to timeout after the channel
-//! has been inactive for 5 seconds:
-//!
-//! ```no_run
-//! # #![feature(std_misc, old_io)]
-//! use std::sync::mpsc::channel;
-//! use std::old_io::timer::Timer;
-//! use std::time::Duration;
-//!
-//! let (tx, rx) = channel::<i32>();
-//! let mut timer = Timer::new().unwrap();
-//!
-//! loop {
-//!     let timeout = timer.oneshot(Duration::seconds(5));
-//!
-//!     select! {
-//!         val = rx.recv() => println!("Received {}", val.unwrap()),
-//!         _ = timeout.recv() => {
-//!             println!("timed out, no message received in 5 seconds");
-//!             break;
-//!         }
-//!     }
-//! }
-//! ```
 
 #![stable(feature = "rust1", since = "1.0.0")]