Repository navigation
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. |
Replies: 2 comments
|
Agree that this dispatcher is unnecessary in this case. More information about when to use |
@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 👍