Skip to content
This repository has been archived by the owner on Aug 30, 2022. It is now read-only.

Commit

Permalink
update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert-Steiner committed Aug 3, 2020
1 parent 6c83409 commit 8419820
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions rust/src/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,14 @@ async fn main() {
_ = signal::ctrl_c() => {}
}

// The moment the message_handler is dropped, the sender of the request is also dropped,
// which means that the state machine shuts itself down.
// The moment the message_handler is dropped, the sender half of the request channel is also
// dropped, which means that the state machine shuts itself down.
warn!("shutting down service");
let _ = state_machine_handle.await;

// No need to drop the metrics handle in the select macro.
// The moment the state machine is dropped, the sender of the metrics is also dropped,
// which means that the metric handle is resolved after all remaining messages have been
// processed.
// The moment the state machine is dropped, the sender half of the metrics channel is also
// dropped, which means that the metric handle is resolved after all remaining messages have
// been processed.
warn!("shutting down metrics service");
let _ = metrics_handle.await;
}

0 comments on commit 8419820

Please sign in to comment.