tokio-global
Simple way to create global tokio runtime, available from any place in code
Usage
[]
= "0.2"
= ["single"] #or multi for multithreaded runtim
Start runtime and use AutoRuntime
trait to run your futures:
use single as rt;
use AutoRuntime;
let _guard = init;
//Now we can exeute futures using runtime
//When guard goes out of scope though,
//we no longer can use it.
let result = .finish.expect;
assert_eq!;