Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0ff27587 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Change AppSearchManagerService's thread pool to use...

Merge "Change AppSearchManagerService's thread pool to use LinkedBlockingQueue." into sc-dev am: 96501c47

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14185077

Change-Id: I7373ef82222b8dfa72ffaa2422cf1553b09d4271
parents a7925f9c 96501c47
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -75,7 +75,7 @@ import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.concurrent.Executor;
import java.util.concurrent.SynchronousQueue;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

@@ -94,7 +94,7 @@ public class AppSearchManagerService extends SystemService {
    // mutate requests will need to gain write lock and query requests need to gain read lock.
    private static final Executor EXECUTOR = new ThreadPoolExecutor(/*corePoolSize=*/1,
            Runtime.getRuntime().availableProcessors(), /*keepAliveTime*/ 60L, TimeUnit.SECONDS,
            new SynchronousQueue<Runnable>());
            new LinkedBlockingQueue<>());

    // Cache of unlocked user ids so we don't have to query UserManager service each time. The
    // "locked" suffix refers to the fact that access to the field should be locked; unrelated to