diff options
| author | 2021-04-15 19:22:30 +0000 | |
|---|---|---|
| committer | 2021-04-15 19:22:30 +0000 | |
| commit | 96501c47e40bdef01129d5fb1f4fdaa9b9d6be13 (patch) | |
| tree | c8aa1f7894f8054011ea54ff68191629626cf8b3 | |
| parent | d389165bd64a546308c4f2d981177641212d0fa9 (diff) | |
| parent | ddf9718ead9d27088f2f43c14a75eb567ec1f63c (diff) | |
Merge "Change AppSearchManagerService's thread pool to use LinkedBlockingQueue." into sc-dev
| -rw-r--r-- | apex/appsearch/service/java/com/android/server/appsearch/AppSearchManagerService.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apex/appsearch/service/java/com/android/server/appsearch/AppSearchManagerService.java b/apex/appsearch/service/java/com/android/server/appsearch/AppSearchManagerService.java index 4ae16aa18305..693acf198818 100644 --- a/apex/appsearch/service/java/com/android/server/appsearch/AppSearchManagerService.java +++ b/apex/appsearch/service/java/com/android/server/appsearch/AppSearchManagerService.java @@ -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 |