[blockchain] Upgrade tokio
- Also upgrade reqwest - Switch to `tokio::runtime::Builder::new_single_thread()` because `tokio::runtime::Runtime::new()` changed it's behavior to create a multithreaded runtime. - `enable_all` enables time and io resource drivers as explained [here](https://docs.rs/tokio/0.2.24/tokio/runtime/index.html#resource-drivers)
This commit is contained in:
@@ -145,7 +145,7 @@ pub fn await_or_block(expr: TokenStream) -> TokenStream {
|
||||
{
|
||||
#[cfg(all(not(target_arch = "wasm32"), not(feature = "async-interface")))]
|
||||
{
|
||||
tokio::runtime::Runtime::new().unwrap().block_on(#expr)
|
||||
tokio::runtime::Builder::new_current_thread().enable_all().build().unwrap().block_on(#expr)
|
||||
}
|
||||
|
||||
#[cfg(any(target_arch = "wasm32", feature = "async-interface"))]
|
||||
|
||||
Reference in New Issue
Block a user