A Flow does not cross to Swift. A callback does.
Exporting a Flow hands Swift something it has no way to collect.
We use Google Analytics to see which pages help people. No ads, no profiles. Privacy Policy
12 posts
Exporting a Flow hands Swift something it has no way to collect.
A browser has no thread pool to offload to.
Each collector re-runs the producer. Two UI observers plus a test is three executions.
Virtual time makes a 30-second timeout instant — and makes a real-dispatcher leak invisible.
replay = 1 re-delivers the last value to every new collector.
Conflation turns two identical emissions into one, so a repeated event vanishes.
Structured concurrency propagates failure upward by design. SupervisorJob is how you declare independence.
Android cancels viewModelScope for you and SwiftUI does not. One scope, two lifetimes, and only one of them has a callback that fires when the screen ends.
Main is supplied by a platform integration, so it exists on Android and iOS and fails at runtime on desktop tests — a crash whose message names a module, not a mistake.
Swift cancels its Task. The Kotlin Job never hears about it, so the work keeps running.
Dispatchers.Default is a single thread in the browser. Code that was merely slow on Android becomes a frozen tab.
A network call written directly in a composable fires an unpredictable number of times. LaunchedEffect, DisposableEffect and SideEffect each define a different notion of when work should happen.