fkrauthan
08/22/2020, 4:44 AMoctylFractal
08/22/2020, 4:47 AMfkrauthan
08/22/2020, 4:51 AMfkrauthan
08/22/2020, 4:52 AMoctylFractal
08/22/2020, 4:55 AMsuspend
function that suspends until the next "tick", offering a much simpler interface than the dispatcher interfacefkrauthan
08/22/2020, 4:58 AMbody.createCoroutine(Continuation(process) {})
2. I store this continuation in a Map
3. In my loop I get the last continuation from that Map and call cont.resume(Unit)cont.resume(Unit)
4. In all my suspend functions that pauses execution I have code like
protected suspend fun yield(): Any? = suspendCoroutine { continuation ->
process.kernel.storeContinuation(continuation)
}
Which updates my stored continuation. and was wondering if there is not an easier/cleaner way for doing thatoctylFractal
08/22/2020, 5:01 AMoctylFractal
08/22/2020, 5:01 AMCoroutineDispatcher
octylFractal
08/22/2020, 5:02 AMCoroutineInterceptor
iircfkrauthan
08/22/2020, 5:02 AMCoroutineDispatcher