Why in the nowinandroid repo do you change to io thread if room/retrofit handles things in a main safe fashion? #818
-
In codelabs https://developer.android.com/codelabs/kotlin-coroutines#8 it says:
In the repo here we have the following code:
Is there a reason for the ioDispatcher being provided here? Is it required? Would it be required if you were interacting with retrofit here instead of Room? I'm looking for best practice and this info seems conflicting. Any light that can be shed on this would be great. TIA. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
@adrem7 I've created a PR to remove this unnecessary dispatcher: Don't forget to close/resolve this discussion if that's ok for you 👍 |
Beta Was this translation helpful? Give feedback.
-
Agree that this dispatcher is unnecessary in this case. More information about when to use |
Beta Was this translation helpful? Give feedback.
@adrem7 I've created a PR to remove this unnecessary dispatcher:
Don't forget to close/resolve this discussion if that's ok for you 👍