summaryrefslogtreecommitdiff
path: root/libs/androidfw/ConfigDescription.cpp
diff options
context:
space:
mode:
author lijilou <lijilou@xiaomi.corp-partner.google.com> 2025-03-21 10:50:15 +0800
committer lijilou <lijilou@xiaomi.corp-partner.google.com> 2025-03-21 11:22:00 +0800
commit1b6cc77f2e3aad049086e56c4f941f5c150d7806 (patch)
tree0e570907f21d430f1829e9f6692ee3da732be343 /libs/androidfw/ConfigDescription.cpp
parent23ba06663f4cc42d971c616a0df3de047d2cd6dc (diff)
Remove the mRemoteTaskStackListeners lock.
RemoteCallbackList sychronizes on RemoteCallbackList.mInterfaces for the following methods: RemoteCallbackList.register RemoteCallbackList.unregister RemoteCallbackList.beginBroadcast (creates a copy-on-write of the list, also under mLock) RemoteCallbackList.finishBroadcast (clears copy-on-write of the list, also under mLock) The last two are done under mLock. The following method doesn't need to hold RemoteCallbackList.mInterfaces because it only accesses an immutable copy of the list, not the modifiable list. RemoteCallbackList.getBroadcastItem (reads copy-on-write array, without mLock) The only requirement to be thread-safe with RemoteCallbackList seems to be to beginBroadcast+getBroadcastItem+finishBroadcast all in the same handler thread, so we do not need another lock to protect. Bug: none Flag: EXEMPT minor optimization Change-Id: Ia40a1570daa48945c0b82d7bc5d8d7960c16f6f7
Diffstat (limited to 'libs/androidfw/ConfigDescription.cpp')
0 files changed, 0 insertions, 0 deletions