yuya_horita
12/26/2018, 9:34 AMclass MainDispatcher: CoroutineDispatcher() {
override fun dispatch(context: CoroutineContext, block: Runnable) {
dispatch_async(dispatch_get_main_queue()) { block.run() }
}
}
olonho
12/26/2018, 5:54 PMyuya_horita
12/27/2018, 5:17 AMyuya_horita
12/27/2018, 5:18 AMolonho
12/27/2018, 6:13 AMcallDelay
doesn’t do smth like runBlocking { delay(1000L) }
?yuya_horita
12/27/2018, 6:20 AMyuya_horita
12/27/2018, 6:21 AMrunBlocking
, but not with the MainScope
.
I just wanted to know why.yuya_horita
12/27/2018, 6:22 AMTypeCastException
.yuya_horita
12/27/2018, 6:27 AMKotlinLong
Objective-C type? not Kotlin.Long. This is just my conjectureolonho
12/27/2018, 6:45 AMdelay
and println
to runBlocking
it behaves as expected, so it’s likely misleading diagnostics of calling blocking function delay in wrong contextyuya_horita
12/27/2018, 7:30 AMelizarov
12/28/2018, 12:06 PMyuya_horita
12/28/2018, 3:45 PM