File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ use clone::Clone;
2323use comm:: { Sender , Receiver , channel} ;
2424use io;
2525use iter:: Iterator ;
26+ use kinds:: Send ;
2627use mem:: drop;
2728use option:: { Some , None } ;
2829use result:: { Ok , Err } ;
@@ -63,25 +64,23 @@ pub enum Signum {
6364///
6465/// # Example
6566///
66- /// ```rust,ignore
67+ /// ```rust,no_run
68+ /// # #![allow(unused_must_use)]
6769/// use std::io::signal::{Listener, Interrupt};
6870///
6971/// let mut listener = Listener::new();
7072/// listener.register(Interrupt);
7173///
72- /// spawn({
73- /// loop {
74- /// match listener.rx.recv() {
75- /// Interrupt => println!("Got Interrupt'ed"),
76- /// _ => (),
77- /// }
74+ /// loop {
75+ /// match listener.rx.recv() {
76+ /// Interrupt => println!("Got Interrupt'ed"),
77+ /// _ => (),
7878/// }
79- /// });
80- ///
79+ /// }
8180/// ```
8281pub struct Listener {
8382 /// A map from signums to handles to keep the handles in memory
84- handles : ~[ ( Signum , ~RtioSignal ) ] ,
83+ handles : ~[ ( Signum , ~RtioSignal : Send ) ] ,
8584 /// This is where all the handles send signums, which are received by
8685 /// the clients from the receiver.
8786 tx : Sender < Signum > ,
You can’t perform that action at this time.
0 commit comments