An important note on threading for PagedLists with Room above is that threading is handled on the background thread by the PagedList with the toLiveData extension function.

This might not be obvious to some reading through the developer guide, but is nicely outlined in the PagedList doc link above. I think this would be useful to include in the main Room developer docs to avoid confusion and potentially unnecessarily launching a Room query for a PagedList in a Dispatchers.IO thread with a coroutine.

--

--

Open Sourcer

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store