Don't remove timeouts that have fired

Closes #22
This commit is contained in:
Alex Crichton
2016-09-08 07:47:07 -07:00
parent cd331dde34
commit 83784fd983
2 changed files with 16 additions and 3 deletions
+12
View File
@@ -23,3 +23,15 @@ fn smoke() {
t!(l.run(timeout));
assert!(start.elapsed() >= dur);
}
#[test]
fn two() {
drop(env_logger::init());
let mut l = t!(Core::new());
let dur = Duration::from_millis(10);
let timeout = t!(Timeout::new(dur, &l.handle()));
t!(l.run(timeout));
let timeout = t!(Timeout::new(dur, &l.handle()));
t!(l.run(timeout));
}