https://kotlinlang.org logo
#coroutines
Title
# coroutines
k

kenkyee

09/05/2017, 7:21 PM
but when you do Observable.fromAsync (Rx1) or Observable.create(), you can set a cancellation callback. Seems a much cleaner way to get notified rather than having to check a flag in a loop for Kotlin coroutines
e

elizarov

09/05/2017, 9:08 PM
You can set a cancellation callback with coroutines, too, via
invokeOnCompletion
, but that is of little use to CPU-hogging code as @jw correctly points out below
k

kenkyee

09/05/2017, 11:55 PM
Ahh.. Missed that in the docs..thx 😀
9 Views