From ecc3fcb2049e1fd4248850bb8b0d5d241b610a59 Mon Sep 17 00:00:00 2001 From: trivernis Date: Sat, 7 Nov 2020 12:17:17 +0100 Subject: [PATCH] Add names to pool threads Signed-off-by: trivernis --- Cargo.toml | 2 +- src/server/mod.rs | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 14aa0b7..d49b256 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "vented" description = "Event driven encrypted tcp communicaton" -version = "0.2.0" +version = "0.2.1" authors = ["trivernis "] edition = "2018" readme = "README.md" diff --git a/src/server/mod.rs b/src/server/mod.rs index fae3d23..1d94487 100644 --- a/src/server/mod.rs +++ b/src/server/mod.rs @@ -81,8 +81,14 @@ impl VentedServer { Self { node_id, event_handler: Arc::new(Mutex::new(EventHandler::new())), - listener_pool: Arc::new(Mutex::new(ScheduledThreadPool::new(num_threads))), - sender_pool: Arc::new(Mutex::new(ScheduledThreadPool::new(num_threads))), + listener_pool: Arc::new(Mutex::new(ScheduledThreadPool::with_name( + "vented_listeners", + num_threads, + ))), + sender_pool: Arc::new(Mutex::new(ScheduledThreadPool::with_name( + "vented_senders", + num_threads, + ))), connections: Arc::new(Mutex::new(HashMap::new())), global_secret_key: secret_key, known_nodes: Arc::new(Mutex::new(nodes)),