Merge "storageproxyd: Start only a single binder thread" into main am: e4cbd9a6a0
am: 8c048624e9
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2670162 Change-Id: I1c8394d9571fb808475e8681f90dbfe0c6acc7db Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
4e44f4f1f8
1 changed files with 5 additions and 2 deletions
|
@ -243,9 +243,12 @@ int main(int argc, char* argv[]) {
|
|||
* Start binder threadpool. At least one extra binder thread is needed to
|
||||
* connect to the wakelock service without relying on polling. If we poll on
|
||||
* the main thread we end up pausing for at least 1s even if the service
|
||||
* starts faster.
|
||||
* starts faster. We set the max thread count to 0 because startThreadPool
|
||||
* "Starts one thread, PLUS those requested in setThreadPoolMaxThreadCount,
|
||||
* PLUS those manually requested in joinThreadPool." We only need a single
|
||||
* binder thread to receive notifications on.
|
||||
*/
|
||||
ABinderProcess_setThreadPoolMaxThreadCount(1);
|
||||
ABinderProcess_setThreadPoolMaxThreadCount(0);
|
||||
ABinderProcess_startThreadPool();
|
||||
|
||||
/* initialize secure storage directory */
|
||||
|
|
Loading…
Reference in a new issue