From ac8553cfd4470ea6bfea9b466b311dae4a1fa176 Mon Sep 17 00:00:00 2001 From: dkhalanskyjb <52952525+dkhalanskyjb@users.noreply.github.com> Date: Mon, 10 Jan 2022 13:38:01 +0300 Subject: [PATCH] kotlin-native/NEW_MM.md: mention the new release of the coroutines --- kotlin-native/NEW_MM.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kotlin-native/NEW_MM.md b/kotlin-native/NEW_MM.md index 4771a9fc8d3..73e248b13a1 100644 --- a/kotlin-native/NEW_MM.md +++ b/kotlin-native/NEW_MM.md @@ -58,14 +58,14 @@ If `kotlin.native.isExperimentalMM()` returns `true`, you've successfully enable ### Update the libraries To take full advantage of the new MM, we released new versions of the following libraries: -* `kotlinx.coroutines`: `1.5.1-new-mm-dev2` at https://maven.pkg.jetbrains.space/public/p/kotlinx-coroutines/maven +* `kotlinx.coroutines`: `1.6.0` (will automatically detect when running with the new memory model). * No freezing. Every common primitive (Channels, Flows, coroutines) works through `Worker` boundaries. * Unlike the `native-mt` version, library objects are transparent for `freeze`. For example, if you freeze a channel, all of its internals will get frozen, so it won't work as expected. In particular, this can happen when freezing something that captures a channel. * `Dispatchers.Default` is backed by a pool of `Worker`s on Linux and Windows and by a global queue on Apple targets. * `newSingleThreadContext` to create a coroutine dispatcher that is backed by a `Worker`. * `newFixedThreadPoolContext` to create a coroutine dispatcher backed by a pool of `N` `Worker`s. * `Dispatchers.Main` is backed by the main queue on Darwin and by a standalone `Worker` on other platforms. - _Don't use `Dispatchers.Main` in unit tests because, in unit tests, nothing processes the main thread queue._ + _In unit tests, nothing processes the main thread queue, so do not use `Dispatchers.Main` in unit tests unless it was mocked, which can be done by calling `Dispatchers.setMain` from `kotlinx-coroutines-test`._ * `ktor`: `1.6.2-native-mm-eap-196` at https://maven.pkg.jetbrains.space/public/p/ktor/eap ### Using previous versions of the libraries