Open
Description
New to rust, so appreciate the help.
I'm trying to call block on an async function within rust and it's throwing errors, was wondering if this is possible.
Using
futures = {version="0.3.28", features=["executor"]}
use futures::executor::block_on;
pub fn test() -> Vec<f32> {
block_on(test_diff())
}
pub async fn test_diff() -> Vec<f32> {
let result = async_func.await;
result
}
but getting a RuntimeError: unreachable error.
Any guidance would be greatly appreciated.