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

Make EventLoopImplBase properly synchronized on Kotlin/Native #3550

Merged
merged 2 commits into from
Dec 27, 2022
Merged

Conversation

qwwdfsad
Copy link
Contributor

@qwwdfsad qwwdfsad commented Dec 7, 2022

Fixes #3547

@qwwdfsad qwwdfsad requested review from dkhalanskyjb and removed request for dkhalanskyjb December 7, 2022 15:56
@qwwdfsad qwwdfsad requested a review from dkhalanskyjb December 8, 2022 17:08
Copy link
Collaborator

@dkhalanskyjb dkhalanskyjb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Filed https://youtrack.jetbrains.com/issue/KT-55477/The-Synchronized-annotation-doesnt-work-in-Kotlin-Native.

In the meantime, this class of errors isn't present anywhere else:

$ git grep '@Synchronized'
kotlinx-coroutines-core/jvm/src/DefaultExecutor.kt:    @Synchronized
kotlinx-coroutines-core/jvm/src/DefaultExecutor.kt:    @Synchronized
kotlinx-coroutines-core/jvm/src/DefaultExecutor.kt:    @Synchronized
kotlinx-coroutines-core/jvm/src/DefaultExecutor.kt:    @Synchronized // used _only_ for tests
kotlinx-coroutines-core/jvm/src/DefaultExecutor.kt:    @Synchronized
kotlinx-coroutines-core/jvm/src/debug/internal/ConcurrentWeakMap.kt:    @Synchronized
kotlinx-coroutines-core/jvm/src/scheduling/Dispatcher.kt:    @Synchronized
kotlinx-coroutines-core/jvm/src/scheduling/Dispatcher.kt:    @Synchronized
kotlinx-coroutines-core/jvm/test/VirtualTimeSource.kt:    @Synchronized
kotlinx-coroutines-core/jvm/test/VirtualTimeSource.kt:    @Synchronized
kotlinx-coroutines-core/jvm/test/VirtualTimeSource.kt:    @Synchronized
kotlinx-coroutines-core/jvm/test/VirtualTimeSource.kt:    @Synchronized
kotlinx-coroutines-core/jvm/test/VirtualTimeSource.kt:    @Synchronized
kotlinx-coroutines-core/jvm/test/VirtualTimeSource.kt:    @Synchronized
reactive/kotlinx-coroutines-reactive/src/Await.kt:        @Synchronized

@qwwdfsad
Copy link
Contributor Author

We actually DM'ed and decided to deprecate it the moment the issue was found: https://youtrack.jetbrains.com/issue/KT-55292/DM-2022-12-08-Volatile-Synchronized-annotations-in-multiplatform

@qwwdfsad qwwdfsad merged commit c194877 into develop Dec 27, 2022
@qwwdfsad qwwdfsad deleted the fix-kn branch December 27, 2022 13:28
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