Proofline

Each wait replaces `event.set` and restores its saved setter.

thekarannagpal/sdk-python#1Reviewed commit 6c684ea

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.

Cited code

Checked
Pull request code. The environment was not checked.
Status
Completed
Started
Completed