I have the following questions about the ContentProvider:

-- The concurrency control of ContentProvider whose
android:multiprocess is set true

    According to Android Dev Guide (http://developer.android.com/intl/
zh-TW/guide/topics/manifest/provider-element.html), it says that    if
android:multiprocess is set to "true", the system can create an
instance in every process where there's a client that wants to
interact with it, thus avoiding the overhead of interprocess
communication.

    Does this mean that multiple instances of the same ContentProvider
will be running on different processes with different VM instance?
if the answer is yes, how do I control the mutual exclusion of
ContentProvider instances running on different VM instances in
different process space?  especially when the ContentProvider
instances accessing the same SQLite DB file?

-- The IPC between client and ContentProvider

...., thus avoiding the overhead of interprocess communication.
Does this mean if the client and ContentProvider are running in the
same VM instance (or  process space), there won't be any IPC when the
client access ContentProvider?      Does the thread pool model
remains ?

in (http://developer.android.com/intl/zh-TW/guide/topics/
fundamentals.html#tsafe), it says:

Similarly, a content provider can receive data requests that originate
in other processes. Although the ContentResolver and ContentProvider
classes hide the details of how the interprocess communication is
managed, ContentProvider methods that respond to those requests — the
methods query(), insert(), delete(), update(), and getType() — are
called from a pool of threads in the content provider's process, not
the main thread of the process. Since these methods may be called from
any number of threads at the same time, they too must be implemented
to be thread-safe.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to