.kotlinx.kotlinx-coroutines-rx2.1.3.8.source-code.RxCancellable.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kotlinx-coroutines-rx2 Show documentation
Show all versions of kotlinx-coroutines-rx2 Show documentation
Coroutines support libraries for Kotlin
/*
* Copyright 2016-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
package kotlinx.coroutines.rx2
import io.reactivex.functions.*
import io.reactivex.plugins.*
import kotlinx.coroutines.*
import kotlin.coroutines.*
internal class RxCancellable(private val job: Job) : Cancellable {
override fun cancel() {
job.cancel()
}
}
internal fun handleUndeliverableException(cause: Throwable, context: CoroutineContext) {
if (cause is CancellationException) return // Async CE should be completely ignored
try {
RxJavaPlugins.onError(cause)
} catch (e: Throwable) {
handleCoroutineException(context, cause)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy