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

New Kotlin Multiplatform memory model #192

Closed
webfrea-k opened this issue Dec 13, 2021 · 6 comments
Closed

New Kotlin Multiplatform memory model #192

webfrea-k opened this issue Dec 13, 2021 · 6 comments

Comments

@webfrea-k
Copy link

webfrea-k commented Dec 13, 2021

Hi guys, I see that release 0.14.0 is just around the corner. Do you plan to support new KMM soon? It looks like relatively simple update.
Coroutines version 1.6.0-RC or 1.6.0-RC2 and Ktor version 1.6.7 supports new MM by default (that's what I've gathered from the Youtrack and Github issues recently).

Motivation

Lifted freezing restrictions on native

Desired solution

As stated in the migration guide above

Additional context

Side note: Is there 0.14.x Snapshot version available anywhere?

@olme04
Copy link
Contributor

olme04 commented Dec 13, 2021

It should work now with https://github.com/JetBrains/kotlin/blob/master/kotlin-native/NEW_MM.md#unexpected-object-freezing (for atomicfu atomics). All other places should be covered by coroutines and ktor.
BTW, seems like only ktor 2.0.0 will support new MM explicitly.
After coroutines 1.6 will be released, I will check, what more we can do in rsocket-kotlin about new MM, at least setup tests for it.

@webfrea-k
Copy link
Author

webfrea-k commented Dec 13, 2021

Ok great. I understood that the support is already there from this comment and the same goes for coroutines.

Are there any snapshot builds available (0.14.0)? :)

@olme04
Copy link
Contributor

olme04 commented Dec 13, 2021

Ok great. I understood that the support is already there from this comment.

The same with rsocket-kotlin. On current moment, both stable versions of ktor and rsocket-kotlin supports new MM with flag to disable freezing.
With version 2.0.0 ktor, will support new MM even without this flag (as I see from this branch).

Are there any snapshot builds available (0.14.0)? :)

no :(, because our snapshot artifactory is shutdown. Soon there will be 0.14.0 release and support for snapshots via github packages

@olme04
Copy link
Contributor

olme04 commented Dec 16, 2021

Update: looks like from ktor 2.0 (looking at Drop old native memory model) ktor will support only new MM. So after ktor 2.0 release, we will also need to adapt rsocket-kotlin to new MM by default.

@olme04
Copy link
Contributor

olme04 commented Apr 13, 2022

Ktor 2.0 released, and rsocket-kotlin is already migrated to it, and using new memory manager by default.
Stable release of rsocket-kotlin with support for new memory manager will be ready soon

@whyoleg
Copy link
Member

whyoleg commented Apr 18, 2022

Supported from 0.15.4

@whyoleg whyoleg closed this as completed Apr 18, 2022
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

No branches or pull requests

3 participants