DataStoreScope

interface DataStoreScope : CoroutineScope(source)

Application-lifetime scope shared by every real DataStore (android/jvm/iOS only). Per the DataStore docs this must not be cancelled by UI lifecycle events: DataStore has no close(), so its in-memory cache is released only when this job ends. wasmJs's LocalStorageStore needs no scope — localStorage access is synchronous.

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun CoroutineScope.asDataStoreScope(): DataStoreScope

Presents an existing scope as DataStoreScope; the wrapper adds nothing but identity.