rumtk_wait_on_task

Macro rumtk_wait_on_task 

Source
macro_rules! rumtk_wait_on_task {
    ( $rt:expr, $func:expr ) => { ... };
    ( $rt:expr, $func:expr, $($arg_items:expr),+ ) => { ... };
}
Expand description

Using the initialized runtime, wait for the future to resolve in a thread blocking manner!

If you pass a reference to the runtime (rt) and an async closure (func), we await the async closure without passing any arguments.

You can pass a third argument to this macro in the form of any number of arguments (arg_item). In such a case, we pass those arguments to the call on the async closure and await on results.