MCPcopy Create free account
hub / github.com/aws/clock-bound / sample

Method sample

clock-bound/src/daemon/io/vmclock.rs:115–126  ·  view source on GitHub ↗

Reads the VMClock shared memory page and returns the current clock state.

(&mut self)

Source from the content-addressed store, hash-verified

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) => {

Calls 2

DisruptedClass · 0.85
snapshotMethod · 0.45

Tested by

no test coverage detected