Skip to main content

Module interruption

Module interruption 

Source
Expand description

Same-sender same-channel message interruption.

When interrupt_on_new_message is enabled, a new message from the same sender in the same channel cancels any in-flight turn for that sender. The handler task checks the cancellation token and aborts if interrupted.

Structs§

CancelToken
A lightweight cancellation token backed by AtomicBool.
InterruptionDetector
Tracks active turns and manages cancellation tokens.
TurnKey
Composite key for tracking active turns: (sender, channel).