Skip to content

Commit

Permalink
feat(hypervisor): add partition idle logic
Browse files Browse the repository at this point in the history
  • Loading branch information
sevenautumns committed Jun 20, 2024
1 parent 727963a commit 30163dc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions hypervisor/src/hypervisor/scheduler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ impl<'a> PartitionTimeframeScheduler<'a> {
return Ok(());
}

if let OperatingMode::Idle = self.partition.get_base_run().1.mode() {
trace!("Partition is IDLE, waiting till the end of the partition time window");
std::thread::sleep(self.timeout.remaining_time());
return Ok(());
}

// If we are in the normal mode at the beginning of the time frame,
// only then we may schedule the periodic process inside a partition
if let OperatingMode::Normal = self.partition.get_base_run().1.mode() {
Expand Down

0 comments on commit 30163dc

Please sign in to comment.