-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Get rid of old Kotlin/Native memory model #3376
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
Conversation
|
I see, will fix |
d78edf1 to
dee15d8
Compare
| fail("unreached") | ||
| } catch (e: UncompletedCoroutinesError) { | ||
| assertTrue((e.message ?: "").contains(name1)) | ||
| assertContains(e.message ?: "", name1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dkhalanskyjb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should be a bit more thorough here. In particular, I think it's worth it to review all files that use kotlin.native.concurrent and get rid of the hacks used to support the old memory model.
I went through the codebase, and here are the results: https://gist.github.com/dkhalanskyjb/ed533dfbaff5b5d39cba8bcc43f13921 Lots of unused imports were eliminated at least.
Of the remaining uses of kotlin.native.concurrent, all seem useful to me, except for kotlinx-coroutines-core/common/src/EventLoop.common.kt. I don't know that code well, so I'm not sure. Is there a benefit to have ThreadLocalEventLoop and it being @ThreadLocal? Sure does look like a measure put in place for the old memory model.
Co-authored-by: dkhalanskyjb <52952525+dkhalanskyjb@users.noreply.github.com>
Co-authored-by: dkhalanskyjb <52952525+dkhalanskyjb@users.noreply.github.com>
I've dropped a comment |
Fixes #3375