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