Proofline

When two threads reuse an unset cancellation event, the last waiter can remove its registration before restoring the methods.

thekarannagpal/sdk-python#1Reviewed commit 4447440

Warning · Concurrency

A new waiter can then save the outgoing wrappers as originals.

Impact

After both waits finish, the event can still retain obsolete wrappers, and repeated races can stack them.

Recommended action

Serialize method restoration and registry removal with registration under the same lock.

Cited code

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