mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-11-26 15:29:57 +08:00
fix: report fatal singleton startup errors
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
|
||||
|
||||
use std::sync::atomic::{AtomicUsize, Ordering};
|
||||
use std::{
|
||||
process::ExitCode,
|
||||
sync::atomic::{AtomicUsize, Ordering},
|
||||
};
|
||||
|
||||
fn main() {
|
||||
fn main() -> ExitCode {
|
||||
let default_parallelism = std::thread::available_parallelism().map(|n| n.get()).unwrap_or(1);
|
||||
let worker_limit = std::cmp::min(default_parallelism, 8);
|
||||
let blocking_limit = 2 * worker_limit;
|
||||
@@ -25,5 +28,5 @@ fn main() {
|
||||
#[cfg(feature = "tokio-trace")]
|
||||
console_subscriber::init();
|
||||
|
||||
app_lib::run();
|
||||
app_lib::run()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user