about summary refs log tree commit diff
path: root/src/libstd/io
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-01-21 09:14:36 -0800
committerAlex Crichton <alex@alexcrichton.com>2015-01-21 09:14:36 -0800
commit8b10733e7a5fd92cdc4fb44e7c808dc47e28e3f2 (patch)
tree31bbdaca98744759771b6a64444b7191b21c0118 /src/libstd/io
parent9173797be11cbc10f83d66a9c7616e27108cdbcd (diff)
parentabccfa4018a407bbe80e8acd0f83c023664ea49a (diff)
downloadrust-8b10733e7a5fd92cdc4fb44e7c808dc47e28e3f2.tar.gz
rust-8b10733e7a5fd92cdc4fb44e7c808dc47e28e3f2.zip
rollup merge of #21389: retep998/timer
Fixes #20943 and adds a test for it
r? @alexcrichton
Diffstat (limited to 'src/libstd/io')
-rw-r--r--src/libstd/io/timer.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libstd/io/timer.rs b/src/libstd/io/timer.rs
index 844a97dea2d..68ae7d0ff20 100644
--- a/src/libstd/io/timer.rs
+++ b/src/libstd/io/timer.rs
@@ -228,6 +228,12 @@ mod test {
     use time::Duration;
 
     #[test]
+    fn test_timer_send() {
+        let mut timer = Timer::new().unwrap();
+        Thread::spawn(move || timer.sleep(Duration::milliseconds(1)));
+    }
+
+    #[test]
     fn test_io_timer_sleep_simple() {
         let mut timer = Timer::new().unwrap();
         timer.sleep(Duration::milliseconds(1));