Search code examples
androidandroid-contentprovider

Does a ContentProvider handle different queries on different threads?


Is the work that a ContentProvider does in its .query() method handled in a separate threads for different queries? What happens if the ContentProvider has to deal with a bunch of queries in a short period of time?

My guess is that it uses a ThreadPool to manage queries, but I can't find any reliable info on this.


Solution

  • I think the ContentProvider doesn't bind a ThreadPool to manage queries, since the query() method is executed in the caller's thread, ContentProvider only need to make sure that the method is thread safe.