blob: 86d251db4c0cce921e8b7c5e98f70fa65d947b0f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
use tokio::runtime;
pub fn new_multi_thread() -> runtime::Builder {
let mut builder = runtime::Builder::new_multi_thread();
builder.worker_threads(4).enable_all();
builder
}
pub fn new_current_thread() -> runtime::Builder {
let mut builder = runtime::Builder::new_current_thread();
builder.enable_all();
builder
}
|