Implementing suspend for@Insert and @Update calls works as expected. However, suspend is not working for @Query calls that return a DataSource.Factory<Int, Content> in order to construct a PagedList. The issue has been outlined in this StackOverflow.

For example this works as expected.

Using suspend for the DataSource.Factory<Int, Content> the app fails to build.

--

--

--

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
Adam Hurwitz

Adam Hurwitz

Open Sourcer

More from Medium

Unsolicited — July 26, 2021

2021 — The year in podcasts

RICK AND MORTY THE BEAUTIFUL, EXTRAVAGANT, EPISODIC ADVENTURE

Project 3: Type Specimen Poster