Skip to main content

token

Function token 

Source
pub fn token() -> CancellationToken
Expand 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.