This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// This module contains helpers for managing lifetime of async functions. | |
/// In particular, it wraps the following two things from tokio: | |
/// * cancellation token to notify "async functions/actors" that they have to stop and | |
/// * tokio::sync::mpsc::Sender object (when it is dropped, parent knows that all its "children" has stopped) | |
/// We use a channel to wait until all children has died (likely, because cancellation_token had told them) | |
/// See more at https://tokio.rs/tokio/topics/shutdown | |
/// Usage: | |
/// ``` |
OlderNewer