Skip to content

Commit

Permalink
Name a few more threads
Browse files Browse the repository at this point in the history
  • Loading branch information
rdaum committed Feb 9, 2024
1 parent 3f14d21 commit 647eb89
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 3 additions & 1 deletion crates/daemon/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,9 @@ fn main() -> Result<(), Report> {

// The scheduler thread:
let loop_scheduler = scheduler.clone();
let scheduler_loop_jh = std::thread::spawn(move || loop_scheduler.run());
let scheduler_loop_jh = std::thread::Builder::new()
.name("moor-scheduler".to_string())
.spawn(move || loop_scheduler.run())?;

zmq_loop(
keypair,
Expand Down
10 changes: 6 additions & 4 deletions crates/daemon/src/rpc_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1029,10 +1029,12 @@ pub(crate) fn zmq_loop(

// Start up the ping-ponger timer in a background thread...
let t_rpc_server = rpc_server.clone();
std::thread::spawn(move || loop {
std::thread::sleep(std::time::Duration::from_secs(5));
t_rpc_server.ping_pong().expect("Unable to play ping-pong");
});
std::thread::Builder::new()
.name("rpc-ping-pong".to_string())
.spawn(move || loop {
std::thread::sleep(std::time::Duration::from_secs(5));
t_rpc_server.ping_pong().expect("Unable to play ping-pong");
})?;

// We need to bind a generic publisher to the narrative endpoint, so that subsequent sessions
// are visible...
Expand Down

0 comments on commit 647eb89

Please sign in to comment.