bitcoin: name the Bitcoin poller thread

This commit is contained in:
Antoine Poinsot 2022-08-05 18:25:28 +02:00
parent 6b2e901814
commit 86c1d32662
No known key found for this signature in database
GPG Key ID: E13FC145CD3F4304

View File

@ -23,10 +23,13 @@ impl Poller {
poll_interval: time::Duration,
) -> Poller {
let shutdown = sync::Arc::from(atomic::AtomicBool::from(false));
let handle = thread::spawn({
let shutdown = shutdown.clone();
move || looper(bit, db, shutdown, poll_interval)
});
let handle = thread::Builder::new()
.name("Bitcoin poller".to_string())
.spawn({
let shutdown = shutdown.clone();
move || looper(bit, db, shutdown, poll_interval)
})
.expect("Must not fail");
Poller { shutdown, handle }
}