carbaj0
05/11/2021, 4:42 PMsuspendCancellableCoroutine <Nothing> {}
needed ? For me is just an empty call
class ProduceStateScopeImpl<T>(
state: MutableState<T>,
override val coroutineContext: CoroutineContext
) : ProduceStateScope<T>, MutableState<T> by state {
override suspend fun awaitDispose(onDispose: () -> Unit): Nothing {
try {
suspendCancellableCoroutine<Nothing> { }
} finally {
onDispose()
}
}
}
streetsofboston
05/11/2021, 6:01 PMlouiscad
05/11/2021, 10:23 PMawaitCancellation()
now that it made it into kotlinx.coroutines stable API.carbaj0
05/12/2021, 4:01 AM