Skip to main content

run_once

Function run_once 

Source
pub fn run_once(
    key: String,
    wait: Duration,
    work: impl FnOnce() + Send + 'static,
) -> bool
Expand description

Run work on a thread of its own unless a flight for key is already running, and wait up to wait for it. True when the flight ended in that time.