When you say that Loaders run requests in the background thread, you need to understand what exactly the Loader class implementations execute requests in the background thread.
The consequence of this is that you will want to use or extend and implement subclasses of the Loader abstract class, rather than using AsyncTask or Java streams. The reason is that when you create a Loader, it expects you to return an instance of type Loader. You cannot use java or AsyncTask thread for this. Subclasses of the Loader class do this by creating their own thread. The client class or the class creating the Loader initializes the loader only. The actual instance of Loader can do whatever you want. It can be anything - insert, update, delete, etc. Android has implemented the implementation of CursorLoader queries from tables in the background thread asynchronously and returns a result set. Android does not provide similar built-in implementations for inserting or updating data. You have an extension option from AsyncTaskLoader (the same class that CursorLoader inherits).
Also, keep in mind that Loaders are used to optimize access to the database and, as such, will send the result to the main thread only when they have completed their task, and not earlier (there is a way to hack, for example, a workaround for publishing updates the user interface stream, but then this violates the paradigm). Loaders are engaged only in the completion of their work and are not interested in providing any updates.
If you just want to handle ContentProvider requests asynchronously, you may need to use the AsyncQueryHandler class provided by Android.
source share