[go: up one dir, main page]

blocking

Macro blocking 

Source
macro_rules! blocking {
    ($($tokens:tt)*) => { ... };
}
Expand description

Spawns a blocking task, which will run on the blocking thread pool, and returns the handle.

ยงExample

let task = blocking! {
    thread::sleep(time::Duration::from_millis(3000));
};
run!(task);