pakoito
03/26/2019, 5:34 PMraulraja
03/26/2019, 5:38 PMraulraja
03/26/2019, 5:39 PMraulraja
03/26/2019, 5:39 PMAdi Polak
03/27/2019, 12:14 PMaballano
04/03/2019, 9:34 AMpakoito
04/03/2019, 9:43 AMMaureen
04/04/2019, 10:50 PMaballano
04/05/2019, 11:29 AMraulraja
04/05/2019, 11:44 AMpakoito
04/05/2019, 11:44 AMcontinueOn
model is what will cause fewer assumptionspakoito
04/05/2019, 11:44 AMbindIn
and the kx.coroutines frameworkpakoito
04/05/2019, 11:45 AMdelay(Context) {}
may also cause confusionraulraja
04/05/2019, 11:56 AMctx.effect
had a second argument which by default switches back to another context when the effect is completed?
!NonBlocking.effect(continueOn = UI) {
foo()
}
or something similarraulraja
04/05/2019, 11:56 AMctx.effect
in favor of just continueOnJorge Castillo
04/05/2019, 11:57 AMJorge Castillo
04/05/2019, 11:57 AMJorge Castillo
04/05/2019, 11:57 AMJorge Castillo
04/05/2019, 11:57 AMaballano
04/05/2019, 11:58 AM!NonBlocking.effect { ... }
for me it feels like any of the kotlin's run, apply, etc
Jorge Castillo
04/05/2019, 11:59 AMpakoito
04/05/2019, 12:01 PMpakoito
04/05/2019, 12:01 PMfun runIn(runOn = NonBlocking, continueOn = EmptyCoroutineContext, f: suspend () -> A)
and
fun runIn(runOn = NonBlocking, continueOn = EmptyCoroutineContext, f: Kind<F, A>)
pakoito
04/05/2019, 12:02 PMdelay(runOn) { }.continueOn(continueOn)
aballano
04/05/2019, 12:03 PMJorge Castillo
04/05/2019, 12:04 PMJorge Castillo
04/05/2019, 12:05 PMaballano
04/05/2019, 12:13 PMfun <F, A> ConcurrentCancellableContinuation<F, *>.runIn(
runOn: CoroutineContext = NonBlocking,
continueOn: CoroutineContext = EmptyCoroutineContext,
f: suspend () -> A
): Kind<F, A> = defer(runOn) { f.effect() }.continueOn(continueOn)
(I just changed paco's delay to defer to make it work)aballano
04/05/2019, 12:14 PMval result1 = fx {
!effect { printCurrentThread() }
!runIn(continueOn = Main) { printCurrentThread() }
!effect { printCurrentThread() }
}