mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-05-14 01:45:46 +00:00
allow set multithread count (#1056)
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user