4 ms·
Even simpler to use `futures::executor::block_on`. No need to create a runtime, you can just call the function. https://docs.rs/futures/latest/futures/executor
by abiro 4y ago
Even simpler to use `futures::executor::block_on`. No need to create a runtime, you can just call the function.
https://docs.rs/futures/latest/futures/executor/fn.block_on.html https://docs.rs/futures/latest/futures/executor/fn.block_on....
- Matthias247 4y agoThat will only allow to run futures which have no IO dependency. Other typically expect a certain runtime to be running, because they eg use the epoll loop of that runtime to make progress.