Function tarantool::fiber::defer_async

source ·
pub fn defer_async<'f, F, T>(f: F) -> LuaJoinHandle<'f, T>where
    F: Future<Output = T> + 'f,
    T: 'f,
Expand description

Async version of defer.

use tarantool::fiber;

let jh = fiber::defer_async(async {
    // do some async work in another fiber
    do_work().await
});
jh.join().unwrap();