File tree 1 file changed +3
-3
lines changed
reactive/kotlinx-coroutines-rx2/src
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,9 @@ public fun CoroutineDispatcher.asScheduler(): Scheduler =
36
36
private class DispatcherScheduler (internal val dispatcher : CoroutineDispatcher ) : Scheduler() {
37
37
38
38
private val job = SupervisorJob ()
39
- private val scope = CoroutineScope (job + dispatcher)
39
+ private val scope = CoroutineScope (job + dispatcher + CoroutineExceptionHandler { _, throwable ->
40
+ RxJavaPlugins .onError(throwable)
41
+ })
40
42
41
43
override fun scheduleDirect (block : Runnable ): Disposable =
42
44
scheduleDirect(block, 0 , TimeUnit .MILLISECONDS )
@@ -136,10 +138,8 @@ public class SchedulerCoroutineDispatcher(
136
138
137
139
/* * @suppress */
138
140
override fun toString (): String = scheduler.toString()
139
-
140
141
/* * @suppress */
141
142
override fun equals (other : Any? ): Boolean = other is SchedulerCoroutineDispatcher && other.scheduler == = scheduler
142
-
143
143
/* * @suppress */
144
144
override fun hashCode (): Int = System .identityHashCode(scheduler)
145
145
}
You can’t perform that action at this time.
0 commit comments