refactor: move async runtime to application module
To have a clear distinction between code dealing with OS process characteristics and code of ncspot itself, it makes sense to move the async runtime together with ncspot as it doesn't have anything to do with the OS process.
This commit is contained in:
committed by
Henrik Friedrichsen
parent
6d32f3d1f8
commit
ae090b6073
10
src/main.rs
10
src/main.rs
@@ -59,14 +59,8 @@ fn register_backtrace_panic_handler() {
|
||||
}));
|
||||
}
|
||||
|
||||
lazy_static!(
|
||||
/// The global Tokio runtime for running asynchronous tasks.
|
||||
static ref ASYNC_RUNTIME: tokio::runtime::Runtime = tokio::runtime::Builder::new_multi_thread()
|
||||
.enable_all()
|
||||
.build()
|
||||
.unwrap();
|
||||
);
|
||||
|
||||
// Functionality related to the operating system process itself is implemented here.
|
||||
// Functionality related to ncspot goes into `Application`.
|
||||
fn main() -> Result<(), String> {
|
||||
register_backtrace_panic_handler();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user