logo

Macro bastion::blocking[][src]

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);