Skip to content

Commit

Permalink
Update description of example #9
Browse files Browse the repository at this point in the history
  • Loading branch information
Finomnis committed Jun 10, 2022
1 parent ec444f6 commit c13d10d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions examples/09_task_cancellation.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
//! This example demonstrates how to implement a clean shutdown
//! of a subsystem.
//!
//! The central mechanism here is tokio::select, which can cancel
//! tasks once one of them finishes. This can be used to cancel
//! tasks once the shutdown was initiated.
//! There are two options to cancel tasks on shutdown:
//! - with [tokio::select]
//! - with [FutureExt::cancel_on_shutdown()]
//!
//! In this case we go with `cancel_on_shutdown()`, but `tokio::select` would be equally viable.
use env_logger::{Builder, Env};
use miette::Result;
Expand Down

0 comments on commit c13d10d

Please sign in to comment.