With Rx, it's very simple and clear with `subscibe...
# coroutines
d
With Rx, it's very simple and clear with
subscibeOn
and
observeOn
to do all this (but coroutines are much better in other aspects... 😉 ). In coroutines things seem much more complex in this aspect, and the 'danger' you mentioned... does that also exist in rx?
e
All the dangers are 100% same as in Rx. The difference is that in Rx some operations under some rare circumstances sometimes run in an unexpected thread. With coroutines if you do
run(myContext) { myCode() }
, then there is 100% guarantee that your code runs in the specified context.
1