summaryrefslogtreecommitdiff
path: root/services/incremental/IncrementalService.cpp
diff options
context:
space:
mode:
authorAlex Buynytskyy <alexbuy@google.com>2020-09-22 11:39:53 -0700
committerAlex Buynytskyy <alexbuy@google.com>2020-09-22 11:45:21 -0700
commitb65a77f7b5f22e9e4d7ae26b2f8e39c05ddd6622 (patch)
treeb843e8350d98096dc2f2dae085a1093701b531b1 /services/incremental/IncrementalService.cpp
parentb486020186dae610a096b6f8a928631732281d9d (diff)
Using wake to forcefully wake up the looper instead of 1s timeout.
Bug: 168156055 Test: atest ApkVerityTest:com.android.apkverity.ApkVerityTest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest ChecksumsTest Change-Id: If65f65f9214b34bf057ed5f1877348d835251d14
Diffstat (limited to 'services/incremental/IncrementalService.cpp')
-rw-r--r--services/incremental/IncrementalService.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/services/incremental/IncrementalService.cpp b/services/incremental/IncrementalService.cpp
index 44a07a17824f..e8bf468f032e 100644
--- a/services/incremental/IncrementalService.cpp
+++ b/services/incremental/IncrementalService.cpp
@@ -308,6 +308,7 @@ IncrementalService::~IncrementalService() {
}
mJobCondition.notify_all();
mJobProcessor.join();
+ mLooper->wake();
mCmdLooperThread.join();
mTimedQueue->stop();
mProgressUpdateJobQueue->stop();
@@ -1386,7 +1387,7 @@ bool IncrementalService::mountExistingImage(std::string_view root) {
}
void IncrementalService::runCmdLooper() {
- constexpr auto kTimeoutMsecs = 1000;
+ constexpr auto kTimeoutMsecs = -1;
while (mRunning.load(std::memory_order_relaxed)) {
mLooper->pollAll(kTimeoutMsecs);
}