summaryrefslogtreecommitdiff
path: root/libs/androidfw/StringPool.cpp
diff options
context:
space:
mode:
author Jordan Demeulenaere <jdemeulenaere@google.com> 2024-05-15 11:08:42 +0200
committer Jordan Demeulenaere <jdemeulenaere@google.com> 2024-05-21 17:14:45 +0200
commit88e15dd07ef8e5cddbd307ec814abd8b9e3c48a2 (patch)
treebef76d19d801a2a81b83e2fba90253531bcde2b0 /libs/androidfw/StringPool.cpp
parentb93b830ac542d60c754a6b0ca11f4dcffe6bd5ab (diff)
Remove calls to invokeOnCompletion
This CL removes all calls to invokeOnCompletion in STL codebase. As mentioned in the KDoc, there is no guarantee on which thread the invokeOnCompletion block is run, which can cause concurrency issues that throw an exception since ag/27342795. The calls to invokeOnCompletion were replaced by a try/finally block. However, it is important to note that a try block launched inside a coroutine might never run if the coroutine is cancelled before it starts. For this reason, we must also specify `start = ATOMIC` when launching the coroutine to make sure that the try/finally block will definitely run until the first suspension point. Bug: 290930950 Bug: 340824084 Test: atest PlatformComposeSceneTransitionLayoutTests Flag: com.android.systemui.scene_container Change-Id: Ia822d4a2e0f424cd7a6715fb7dbeaf46affcaba3
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions