.kotlinx.kotlinx-coroutines-rx3.1.8.1-Beta.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-rx3 Show documentation
Show all versions of kotlinx-coroutines-rx3 Show documentation
Coroutines support libraries for Kotlin
package kotlinx.coroutines.rx3
import io.reactivex.rxjava3.functions.*
import io.reactivex.rxjava3.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) {
cause.addSuppressed(e)
handleCoroutineException(context, cause)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy