forked from M-Labs/artiq
parent
82c4c61290
commit
be0953d98f
|
@ -139,14 +139,12 @@ impl Scheduler {
|
||||||
thread.interrupted = false;
|
thread.interrupted = false;
|
||||||
thread.generator.resume(WaitResult::Interrupted)
|
thread.generator.resume(WaitResult::Interrupted)
|
||||||
}
|
}
|
||||||
WaitRequest { event: Some(_), timeout: Some(instant) } if now >= instant =>
|
|
||||||
thread.generator.resume(WaitResult::TimedOut),
|
|
||||||
WaitRequest { event: None, timeout: Some(instant) } if now >= instant =>
|
|
||||||
thread.generator.resume(WaitResult::Completed),
|
|
||||||
WaitRequest { event: Some(event), timeout: _ } if unsafe { (*event)() } =>
|
|
||||||
thread.generator.resume(WaitResult::Completed),
|
|
||||||
WaitRequest { event: None, timeout: None } =>
|
WaitRequest { event: None, timeout: None } =>
|
||||||
thread.generator.resume(WaitResult::Completed),
|
thread.generator.resume(WaitResult::Completed),
|
||||||
|
WaitRequest { timeout: Some(instant), .. } if now >= instant =>
|
||||||
|
thread.generator.resume(WaitResult::TimedOut),
|
||||||
|
WaitRequest { event: Some(event), .. } if unsafe { (*event)() } =>
|
||||||
|
thread.generator.resume(WaitResult::Completed),
|
||||||
_ => {
|
_ => {
|
||||||
if self.run_idx == start_idx {
|
if self.run_idx == start_idx {
|
||||||
// We've checked every thread and none of them are runnable.
|
// We've checked every thread and none of them are runnable.
|
||||||
|
|
Loading…
Reference in New Issue