Change max_width

This commit is contained in:
Dominik Werder
2021-04-16 14:52:24 +02:00
parent 3afcddb1c7
commit 55376b4405
11 changed files with 77 additions and 202 deletions

View File

@@ -8,21 +8,24 @@ use tracing::{debug, error, info, trace, warn};
pub fn run<T, F: std::future::Future<Output = Result<T, Error>>>(f: F) -> Result<T, Error> {
tracing_init();
tokio::runtime::Builder::new_multi_thread()
.worker_threads(12)
.max_blocking_threads(256)
.enable_all()
.on_thread_start(|| {
let old = panic::take_hook();
panic::set_hook(Box::new(move |info| {
error!("✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗ panicking\n{:?}\nLOCATION: {:?}\nPAYLOAD: {:?}", backtrace::Backtrace::new(), info.location(), info.payload());
//old(info);
}));
})
.build()
.unwrap()
.block_on(async {
f.await
})
.worker_threads(12)
.max_blocking_threads(256)
.enable_all()
.on_thread_start(|| {
let old = panic::take_hook();
panic::set_hook(Box::new(move |info| {
error!(
"✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗ panicking\n{:?}\nLOCATION: {:?}\nPAYLOAD: {:?}",
backtrace::Backtrace::new(),
info.location(),
info.payload()
);
//old(info);
}));
})
.build()
.unwrap()
.block_on(async { f.await })
}
pub fn tracing_init() {