Skip to main content

hedge

Macro hedge 

Source
macro_rules! hedge {
    ($delay:expr, $primary:expr, $backup:expr) => { ... };
}
Expand description

Macro for hedging an operation (placeholder).

In the full implementation, this spawns the primary, waits for the deadline, and races with the backup if needed.

§Example (API shape)

let result = hedge!(
    100.millis(),           // hedge delay
    call_primary_server(),  // primary future
    || call_backup_server() // backup closure (only called if needed)
);