Warning · Edge case
Impact
With `timeout=0`, a concurrent signal between those steps returns `STOPPED` instead of `TIMED_OUT`.
Recommended action
Sample the entry flag before starting the timeout clock, and apply the deadline to subsequent cancellation checks.