[−][src]Macro pasts::exec
Execute futures concurrently; in parallel if the target supports it, otherwise asynchronously.
Similar to poll!()
, except that you can call it from
synchronous code, and after calling it once, future calls will panic.
The program will exit after the first future returns
Poll::Ready
. That means all threads and
single-threaded executorr started by this macro will run for the remainder
of the program, giving them a 'static
lifetime.
Example
async fn async_main() { /* your code here */ } // Note that you may add multiple concurrent async_main()s. pasts::exec!(async_main());