Timer: always park nested Park (#327)

The nested `Park` might need to do some work, even if the duration is 0
seconds (e.g. a `Reactor`).

Similar to what #313 did for CurrentThread.
This commit is contained in:
Stefan Bühler
2018-05-01 16:33:41 -07:00
committed by Carl Lerche
parent 6defeeb2ba
commit 6a0ecef81a
+4
View File
@@ -478,6 +478,8 @@ where T: Park,
if deadline > now {
self.park.park_timeout(deadline - now)?;
} else {
self.park.park_timeout(Duration::from_secs(0))?;
}
}
None => {
@@ -500,6 +502,8 @@ where T: Park,
if deadline > now {
self.park.park_timeout(cmp::min(deadline - now, duration))?;
} else {
self.park.park_timeout(Duration::from_secs(0))?;
}
}
None => {