pub fn token() -> CancellationTokenExpand description
Get the global shutdown token.
All modules should clone this token and listen for cancellation
in their main loops via token.cancelled().await.
The token is created lazily on first access.
pub fn token() -> CancellationTokenGet the global shutdown token.
All modules should clone this token and listen for cancellation
in their main loops via token.cancelled().await.
The token is created lazily on first access.