DALDEI
08/15/2018, 10:25 PMgildor
08/16/2018, 1:11 AMnewFixedThreadPoolContext
function and extension to convert ThreadExecutor
to Context) this dispatcher will be intentionally blocking and should be used to wrap blocking code.
Than just use:
withContext(IoDispatcher) {
someBlockingCall()
}
Or with any other coroutine builder, depending on casewithoutclass
08/16/2018, 3:04 PMIO
scheduler of Rx you can also use Executors.newCachedThreadPool().asCoroutineDispatcher()
DALDEI
08/18/2018, 2:15 AM