Ray
12/07/2020, 4:17 PMQuery()
suspend fun getUser():User
Repository
suspend fun getUserFromDb():User {
return withcontext (<http://dispatcher.IO|dispatcher.IO>) {return data.getUser()}
}
Thread in Slack Conversationkevin.cianfarini
12/07/2020, 6:02 PMThe generated code ensures that the insert happens off of the UI thread.Room suspend functions are main safe
Ray
12/07/2020, 7:31 PM