使用线程池管理线程,新增worker_threads参数

This commit is contained in:
Zihaoxu2008
2025-01-25 19:54:47 +08:00
parent 7021969b27
commit b170844fc4
3 changed files with 23 additions and 19 deletions

View File

@@ -14,6 +14,7 @@ pub struct Configuration {
spam_file: String,
spam_delay_ms: i32,
random_prefix: bool,
pub worker_threads: i32
}
impl Configuration {
@@ -56,6 +57,7 @@ impl Configuration {
spam_file: "".to_string(),
spam_delay_ms: 0,
random_prefix: false,
worker_threads: 100
}
}