From b4680dcab9d40bdc945d0b50f3e84489754d304f Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 30 May 2019 13:21:45 +0200 Subject: [PATCH] Use cached thread pool for database work --- app/src/main/java/eu/faircode/email/DB.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/DB.java b/app/src/main/java/eu/faircode/email/DB.java index 97fa897316..17e6d3770d 100644 --- a/app/src/main/java/eu/faircode/email/DB.java +++ b/app/src/main/java/eu/faircode/email/DB.java @@ -89,7 +89,7 @@ public abstract class DB extends RoomDatabase { public abstract DaoLog log(); private static DB sInstance; - private static ExecutorService executor = Executors.newSingleThreadExecutor(Helper.backgroundThreadFactory); + private static ExecutorService executor = Executors.newCachedThreadPool(Helper.backgroundThreadFactory); private static final String DB_NAME = "fairemail";