Skip to content

Introduce a rendezvous on CancellableContinuationImpl.parentHandle to… #3380

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 2, 2022

Conversation

qwwdfsad
Copy link
Collaborator

… avoid race with original thread setting parent handle, while another thread nulls it out during cancellation via detachChild

Fixes on of the races found in #3378

@qwwdfsad qwwdfsad requested a review from dkhalanskyjb July 27, 2022 15:51
@qwwdfsad
Copy link
Collaborator Author

Both JVM and K/N are affected, though I've failed to find any potential harm from this race.
The only scenario that comes to my mind is that the published CC instance may retain its [cancelled parent in memory, while CC itself is not cleaned

… avoid race with original thread setting parent handle, while another thread nulls it out during cancellation via detachChild

Fixes on of the races found in #3378
@qwwdfsad qwwdfsad force-pushed the fix-race-on-parent-handle branch from 496b146 to 1460dfc Compare July 28, 2022 08:52
@qwwdfsad qwwdfsad requested a review from elizarov August 1, 2022 13:15
@qwwdfsad qwwdfsad merged commit 371e4f3 into develop Aug 2, 2022
@qwwdfsad qwwdfsad deleted the fix-race-on-parent-handle branch August 2, 2022 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants