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
+8
View File
@@ -276,6 +276,13 @@ struct NetworkOptions {
)]
multi_thread: Option<bool>,
#[arg(
long,
env = "ET_MULTI_THREAD_COUNT",
help = t!("core_clap.multi_thread_count").to_string(),
)]
multi_thread_count: Option<u32>,
#[arg(
long,
env = "ET_DISABLE_IPV6",
@@ -819,6 +826,7 @@ impl NetworkOptions {
f.foreign_relay_bps_limit = self
.foreign_relay_bps_limit
.unwrap_or(f.foreign_relay_bps_limit);
f.multi_thread_count = self.multi_thread_count.unwrap_or(f.multi_thread_count);
cfg.set_flags(f);
if !self.exit_nodes.is_empty() {