-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
1.6.0-native-mt broken with shareIn #3136
Comments
…ive-mt mode as it is not supported Fixes #3136
Same here |
Can we get a hotfix for this? This forces us to stay on 1.5 |
We're aiming to release 1.6.1 along with 1.6.1-native-mt next wekk |
@qwwdfsad |
Sorry for the delay, we had to postpone the release for now. Please stay tuned for the updates |
@qwwdfsad maybe an ETA for this? It pops up from time to time and we have to create some partial hotfixes because we are waiting for the fix in the new version |
…ive-mt mode as it is not supported Fixes #3136
…ive-mt mode as it is not supported Fixes #3136
* Provides newSingleThreadedContext. * Provides Dispatchers.Main on iOS, Dispatchers.Default everywhere. * Coroutine references (Job), all kinds of channels and StateFlow are shareable across workers. * Each individual coroutine is confined to a single worker. * Update Dispatchers docs to account for native-mt changes. * Multithreaded support in select expression. * Fix ObjC autorelease object leaks with native-mt dispatchers (#2477) Additional fixes: * Fixed broadcast builder with different thread * Fixed adding a child to a frozen parent job Fixes #462 Fixes #470 Fixes #765 Fixes #1645 Fixes #1751 Fixes #1828 Fixes #1831 Fixes #1764 Fixes #2064 Fixes #2025 Fixes #2226 Fixes #2138 Fixes #2263 Fixes #2322 Fixes #2283 Fixes #2688 Fixes #2398 Fixes #3136
1.6.1-native-mt is out |
Otherwise the sharing fails with the error: "Cannot start an undispatched coroutine in another thread DefaultDispatcher from current MainThread" This is supposedly fixed Kotlin/kotlinx.coroutines#3136, but for some reason, the fix doesn't work when the new memory model is enabled
* Provides newSingleThreadedContext. * Provides Dispatchers.Main on iOS, Dispatchers.Default everywhere. * Coroutine references (Job), all kinds of channels and StateFlow are shareable across workers. * Each individual coroutine is confined to a single worker. * Update Dispatchers docs to account for native-mt changes. * Multithreaded support in select expression. * Fix ObjC autorelease object leaks with native-mt dispatchers (#2477) Additional fixes: * Fixed broadcast builder with different thread * Fixed adding a child to a frozen parent job Fixes #462 Fixes #470 Fixes #765 Fixes #1645 Fixes #1751 Fixes #1828 Fixes #1831 Fixes #1764 Fixes #2064 Fixes #2025 Fixes #2226 Fixes #2138 Fixes #2263 Fixes #2322 Fixes #2283 Fixes #2688 Fixes #2398 Fixes #3136
Edit: I just realized that with the new memory manager, coroutines are multithreaded even without the |
Yup, and the new memory manager is becoming the default in 1.7.20 (there's an ongoing RC) |
@chippmann And yes, you don't need to use the |
Working with 1.6.3-native-mt version on KMM. Facing same issue on iOS. Does someone else have this issue or is there any fix for that? |
Stop using the native-mt, not needed anymore with Kotlin 1.7.20+ |
Would probably be good to update the documentation here then. Also it is now referring to a 1.6.4-native-mt which doesn't exist |
I bet you could get a doc updating PR accepted 🙂 |
The following example:
Throws an exception on native (tried on iosSimulatorArm64) using Kotlin 1.6.10 and coroutines 1.6.0. This was working fine with kotlin 1.5.2.
The text was updated successfully, but these errors were encountered: