[−][src]Function kayrx::karx::exec
pub fn exec<F, T>(future: F) -> T where
F: Future<Output = T>,
Spawns a karx and blocks the current thread on its result.
Calling this function is similar to spawning a thread and immediately joining it, except an asynchronous karx will be spawned.
See also: karx::block
.
Examples
use kayrx::karx; fn main() { karx::exec(async { println!("Hello, world!"); }) }