Skip to content
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

Prevent second racy resume in CancellableContinuation #901

Closed
qwwdfsad opened this issue Dec 18, 2018 · 0 comments
Closed

Prevent second racy resume in CancellableContinuation #901

qwwdfsad opened this issue Dec 18, 2018 · 0 comments

Comments

@qwwdfsad
Copy link
Collaborator

qwwdfsad commented Dec 18, 2018

https://github.com/Kotlin/kotlinx.coroutines/blob/develop/common/kotlinx-coroutines-core-common/src/CancellableContinuationImpl.kt#L227

@qwwdfsad qwwdfsad changed the title Prevent more than one racy resume in CancellableContinuation Prevent second racy resume in CancellableContinuation Dec 18, 2018
elizarov added a commit that referenced this issue Dec 19, 2018
* Always throw ISE on the second resume attempt
* Always throw ISE on the second invokeOnCancellation attempt when cancelled
* Moved error-throwing code into separate funs (slight optimization)

Fixes #901
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant