Add names to pool threads

Signed-off-by: trivernis <trivernis@protonmail.com>
pull/1/head
trivernis 4 years ago
parent 394e2bb68e
commit ecc3fcb204
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

@ -1,7 +1,7 @@
[package] [package]
name = "vented" name = "vented"
description = "Event driven encrypted tcp communicaton" description = "Event driven encrypted tcp communicaton"
version = "0.2.0" version = "0.2.1"
authors = ["trivernis <trivernis@protonmail.com>"] authors = ["trivernis <trivernis@protonmail.com>"]
edition = "2018" edition = "2018"
readme = "README.md" readme = "README.md"

@ -81,8 +81,14 @@ impl VentedServer {
Self { Self {
node_id, node_id,
event_handler: Arc::new(Mutex::new(EventHandler::new())), event_handler: Arc::new(Mutex::new(EventHandler::new())),
listener_pool: Arc::new(Mutex::new(ScheduledThreadPool::new(num_threads))), listener_pool: Arc::new(Mutex::new(ScheduledThreadPool::with_name(
sender_pool: Arc::new(Mutex::new(ScheduledThreadPool::new(num_threads))), "vented_listeners",
num_threads,
))),
sender_pool: Arc::new(Mutex::new(ScheduledThreadPool::with_name(
"vented_senders",
num_threads,
))),
connections: Arc::new(Mutex::new(HashMap::new())), connections: Arc::new(Mutex::new(HashMap::new())),
global_secret_key: secret_key, global_secret_key: secret_key,
known_nodes: Arc::new(Mutex::new(nodes)), known_nodes: Arc::new(Mutex::new(nodes)),

Loading…
Cancel
Save