but when you do Observable.fromAsync (Rx1) or Obse...
# coroutines
k
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
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
Ahh.. Missed that in the docs..thx 😀