kluck
04/30/2019, 7:29 AMfun <Type> IO<Type>.useCase(ok: (Type) -> Unit, error: (Throwable) -> Unit): IO<Unit> = fx {
Dispatchers.IO.shift().flatMap { this@useCase }.continueOn(Dispatchers.Main).map(ok).handleError(error).bind()
}
While debugging, I can see that my IO gets executed on DefaultDispatcher-worker-1
, but it never seems to reach my ok
or error
lambda