Yokan / rebuild
Course 1 8624561

RoomDispatchers.kt

composeApp/src/nonWebMain/kotlin/eu/friedcutlet/yokan/database/room/RoomDispatchers.kt

implementation15 lines
1package eu.friedcutlet.yokan.database.room23import kotlinx.coroutines.CoroutineDispatcher4import kotlinx.coroutines.Dispatchers5import kotlinx.coroutines.IO67/**8 * The serialized lane used by Room. Views of [Dispatchers.IO] are elastic on JVM and Native9 * (a private pool, never Darwin's GCD-backed Default), so callers blocked in10 * [RoomYokanDatabase]'s `runBlocking` bridges cannot starve it of a thread.11 */12internal val roomPersistenceDispatcher: CoroutineDispatcher = Dispatchers.IO.limitedParallelism(1)1314/** The separate lane a synchronous replacement blocks on while it waits for [roomPersistenceDispatcher]. */15internal val roomReplacementDispatcher: CoroutineDispatcher = Dispatchers.IO16

Search chapters, reference and source filenames.