From 1840d35645db2310402f93a04cc4b645c87aea3a Mon Sep 17 00:00:00 2001 From: Mikhail Naganov Date: Mon, 19 Aug 2024 14:48:28 -0700 Subject: [PATCH] audio: Start Binder pool thread explicitly It was noted that calling 'ABinderProcess_startThreadPool' results in the audio HAL service having more Binder pool threads than without it. This is preferred to having just one thread via 'ABinderProcess_joinThreadPool' as in the latter case clients may seemingly be blocked instead of being served by a newly spawned thread from the pool. Bug: 357669241 Test: atest VtsHalAudioCoreTargetTest Change-Id: Ia8ed52b3c5a95cea12d063a0e75ac908af9260f8 --- audio/aidl/default/main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/audio/aidl/default/main.cpp b/audio/aidl/default/main.cpp index 6ab747db32..0b3e3ba00d 100644 --- a/audio/aidl/default/main.cpp +++ b/audio/aidl/default/main.cpp @@ -71,6 +71,7 @@ int main() { // For more logs, use VERBOSE, however this may hinder performance. // android::base::SetMinimumLogSeverity(::android::base::VERBOSE); ABinderProcess_setThreadPoolMaxThreadCount(16); + ABinderProcess_startThreadPool(); // Guaranteed log for b/210919187 and logd_integration_test LOG(INFO) << "Init for Audio AIDL HAL";