How To Create A Thread-safe Contentprovider?
Android documentation says ContentProvider methods can be called from various ContentResolver objects in different processes and threads, they must be implemented in a thread-
Solution 1:
You could make every method synchronized
, but make sure it is absolutely necessary before you do. In cases where the underlying data source is already thread-safe making the methods synchronized
could be costly. See my blog post on this topic for more information.
Post a Comment for "How To Create A Thread-safe Contentprovider?"