Warning · Concurrency
If the first wait exits first, it removes the second wait’s wrapper, and the second wait later reinstalls the first wait’s wrapper.
Impact
The caller’s event remains modified after both waits, and the remaining wait can miss a timely cancellation.
Recommended action
Avoid replacing `event.set` per wait; use shared delivery tracking with independent waiter registration and cleanup.