André Thiele
10/14/2025, 11:08 AMAndré Thiele
10/14/2025, 11:15 AMAndré Thiele
10/14/2025, 11:16 AMMatthew Ramotar
10/14/2025, 11:38 AMFetcher.of { key ->
// DON'T ACTUALLY DO THIS IN PROD
val interceptor = coroutineContext[ContinuationInterceptor]
check(interceptor == ioDispatcher) { "Fetcher not on IO" }
api.get(key)
}
https://discuss.kotlinlang.org/t/checking-that-a-coroutinescope-uses-the-correct-dispatcher/23386Matthew Ramotar
10/14/2025, 11:39 AM.flowOn(ioDispatcher) is the right mechanism so you don’t need to scatter withContext(ioDispatcher)