Skip to main content

Module shutdown

Module shutdown 

Source
Expand description

Cooperative shutdown signal shared across threads. Clones observe the same flag: any clone’s cancel() is visible to every other clone’s is_cancelled(). Cancellation is one-way and sticky.

Structs§

ShutdownToken
Cloneable one-shot cancellation flag. The run loop polls is_cancelled each tick; signal handlers and debug servers call cancel to stop it.