Where Synchronous Room is Safe

So long as you do your Room database I/O on a background thread, Room does not care where that background thread came from. Room is not forcing you to use some Room-supplied thread — it is just forcing you to use some background thread.

Hence, you are welcome to use non-reactive Room @Dao options from places where you already have a background thread, such as a Worker for use with WorkManager or a JobIntentService.

Prev Table of Contents Next

This book is licensed under the Creative Commons Attribution-ShareAlike 4.0 International license.