@Denis Shurygin Have you tried? Give me some code examples. You do need to worry about the context you’re calling from. Where are you adding an Observer that you don’t know the thread context? As for freezing the parent, what parent are you thinking? Assuming something like a mobile app, you’re configuring that observer from the UI, and almost certainly from the UI thread. It’s really not that complicated. You’re going to experience some rethinking of
how you architect, but it is not true that you can’t build sophisticated architectures. I would also like mt coroutines, but you can build things now without them. Here’s a basic sample. I need to write a blog post about what this is actually doing, but essentially we pass in a lambda that extracts data from sqldelight whenever the db is updated. That can happen in any thread. That gets pushed to the UI, and is transferred to the main thread along the way. The “parent” isn’t frozen. Just the extract lambda. Thinking in terms of native and thread confinement is different, but it’s really not that complex. It’s actually simpler conceptually. Not wanting to worry about thread context is what gets a lot of developers in trouble in the first place.
https://github.com/touchlab/DroidconKotlin/blob/kotlin-1.3.20/sessionize/lib/src/commonMain/kotlin/co/touchlab/sessionize/ScheduleModel.kt#L14