> what is the main benefit of using coroutines ...
# coroutines
d
what is the main benefit of using coroutines instead?
non-blocking code? 🙂
p
@deviant RxJava and Reactive Streams also facilitate writing non-blocking code. I was trying to ask what coroutines will do better. I think I understand better now.
d
rxjava still uses callbacks/futures concept. when you use it synchronously it still blocks the thread. coroutine can suspend the running code context without blocking the thread.
g
that's not quite accurate, if your using callbacks on a future then you are using it synchronously (in that A happens before B), but it is not blocking.
d
sure. but who wants callbacks hell when we have coroutines?