allow set multithread count (#1056)

This commit is contained in:
Sijie.Sun
2025-06-26 02:19:33 +08:00
committed by GitHub
parent cd26d9f669
commit 70e69a382e
5 changed files with 19 additions and 1 deletions
+2 -1
View File
@@ -256,8 +256,9 @@ impl EasyTierLauncher {
self.thread_handle = Some(std::thread::spawn(move || {
let rt = if cfg.get_flags().multi_thread {
let worker_threads = 2.max(cfg.get_flags().multi_thread_count as usize);
tokio::runtime::Builder::new_multi_thread()
.worker_threads(2)
.worker_threads(worker_threads)
.enable_all()
.build()
} else {