Reads the VMClock shared memory page and returns the current clock state.
(&mut self)
| 113 | /// In both states, a `ControlRequest::Shutdown` (or a dropped control sender) exits the loop. |
| 114 | /// |
| 115 | /// # Panics |
| 116 | /// - If the `clock_disruption_sender` is unable to send a clock disruption event. |
| 117 | pub async fn run(&mut self) { |
| 118 | debug!("Starting VMClock runner."); |
| 119 | |
| 120 | loop { |
| 121 | tokio::select! { |
| 122 | _ = self.interval.tick() => { |
| 123 | self.handle_tick(); |
| 124 | } |
| 125 | ctrl_req = self.ctrl_receiver.recv() => { |
| 126 | match ctrl_req { |
| 127 | // this select can happen if `SourceIO` drops the ctrl_sender |
| 128 | None => break, |
| 129 | Some(ControlRequest::Shutdown) => { |
no test coverage detected