Skip to content

Commit

Permalink
Add caveats section to Toplevel::catch_signals
Browse files Browse the repository at this point in the history
  • Loading branch information
Finomnis committed May 16, 2022
1 parent c57a783 commit 5211d22
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/toplevel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,15 @@ impl<ErrType: ErrTypeTraits> Toplevel<ErrType> {
/// - On Windows:
/// - Ctrl+C (SIGINT)
///
/// - On Linux:
/// - On Unix:
/// - SIGINT and SIGTERM
///
/// # Caveats
///
/// This function internally uses [tokio::signal] with all of its caveats.
///
/// Especially the caveats from [tokio::signal::unix::Signal] are important for Unix targets.
///
pub fn catch_signals(self) -> Self {
let shutdown_token = self.subsys_handle.global_shutdown_token().clone();

Expand Down

0 comments on commit 5211d22

Please sign in to comment.