use lazy_static::lazy_static;
use std::future::Future;
use std::sync::Mutex;
use tokio::runtime::{Builder, Runtime};

lazy_static! {
    static ref RUNTIME: Mutex<Runtime> = Mutex::new(
        Builder::new()
            .basic_scheduler() // Do not make a new thread since this runtime is only used for network requests
            .enable_all()
            .build()
            .unwrap()
    );
}

pub fn blocking<F: Future>(future: F) -> F::Output {
    RUNTIME.lock().unwrap().block_on(future)
}

use lazy_static::lazy_static;
use std::future::Future;
use std::sync::Mutex;
use tokio::runtime::{Builder, Runtime};

lazy_static! {
    static ref RUNTIME: Mutex<Runtime> = Mutex::new(
        Builder::new()
            .basic_scheduler() // Do not make a new thread since this runtime is only used for network requests
            .enable_io()
            .build()
            .unwrap()
    );
}

pub fn blocking<F: Future>(future: F) -> F::Output {
    RUNTIME.lock().unwrap().block_on(future)
}

--- 
+++ 
@@ -7,7 +7,7 @@
     static ref RUNTIME: Mutex<Runtime> = Mutex::new(
         Builder::new()
             .basic_scheduler() // Do not make a new thread since this runtime is only used for network requests
-            .enable_io()
+            .enable_all()
             .build()
             .unwrap()
     );
Revert "enable only I/O reactor for async operations"

This reverts commit 0b759a47339845cf5dea2097d3c0295bbdfc03c6.
