pub enum ModuleControlCommand {
Draining {
reason: RouteCloseReason,
deadline_ms: u64,
},
}Expand description
One-way subc-to-module channel-0 control command.
Variants§
Draining
Fields
reason: RouteCloseReasondeadline_ms: u64Absolute Unix-millisecond deadline for this drain.
WALL CLOCK, WHILE THE DAEMON ENFORCES THE CEILING ON A
SUSPEND-EXCLUDING MONOTONIC CLOCK (Instant, supervise.rs). Both
processes share one host so CLOCK_REALTIME agrees exactly, and the
two clocks diverge only across host sleep: Instant stops, wall does
not. So a module that sleeps mid-drain wakes to a deadline further in
the past than the daemon’s own ceiling, computes LESS remaining time
than it has, and seals early.
That direction is deliberate and is the safe one — a module stopping early loses nothing, since the daemon kills at its own ceiling regardless. The reverse (a module believing it has time the daemon has already spent) is the failure this ordering avoids. A module must therefore treat this as “no later than”, never as a grant.
Trait Implementations§
Source§impl Clone for ModuleControlCommand
impl Clone for ModuleControlCommand
Source§fn clone(&self) -> ModuleControlCommand
fn clone(&self) -> ModuleControlCommand
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more