summaryrefslogtreecommitdiff
path: root/docs/html/sdk/api_diff/11/changes
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2012-06-22 13:37:57 -0700
committerJeff Brown <jeffbrown@google.com>2012-06-22 15:24:26 -0700
commitb33eb4e32a25e28677524c68be02ca7034351bf0 (patch)
treeafcf75f89dfdce4e7f3cdcd7e332c1484a99c29c /docs/html/sdk/api_diff/11/changes
parent880c5f5aea737aee885bc4abee76c11db565f9d7 (diff)
Deprecate DatabaseUtils.InsertHelper.
This class does not offer any advantages over SQLiteStatement and just makes code more complex and error-prone. Documented that the class is not thread-safe. Removed a potential deadlock in insert() and replace() caused by the insertInternal() method being synchronized in the case where the class was being used concurrently (woe to you!). Thread A would start a transaction. Thread B would call insertInternal() and acquire the object monitor, but block because it could not obtain the db connection because thread A is holding onto it. Thread A would call insertInternal() and block because Thread B was holding the object monitor. Deadlock. Changed this code to use a transaction instead of a lock, which provides the necessary mutual exclusion guarantee without the potential for a deadlock. Even so, the class really isn't thread safe. Bug: 6625094 Change-Id: I51d9a15567a6f2bad6f25e550b48f8f6ffcab2a7
Diffstat (limited to 'docs/html/sdk/api_diff/11/changes')
0 files changed, 0 insertions, 0 deletions