From 51f3a348b757c9097d40ada78dbb1c5c42fda8d6 Mon Sep 17 00:00:00 2001 From: Ammar Githam Date: Sun, 23 May 2021 20:03:34 +0900 Subject: [PATCH] Add some TODO --- app/src/main/java/awais/instagrabber/utils/AppExecutors.kt | 1 + app/src/main/java/awais/instagrabber/utils/Debouncer.java | 1 + 2 files changed, 2 insertions(+) diff --git a/app/src/main/java/awais/instagrabber/utils/AppExecutors.kt b/app/src/main/java/awais/instagrabber/utils/AppExecutors.kt index f923daa2..a1a0c8ec 100644 --- a/app/src/main/java/awais/instagrabber/utils/AppExecutors.kt +++ b/app/src/main/java/awais/instagrabber/utils/AppExecutors.kt @@ -29,6 +29,7 @@ import java.util.concurrent.Executors * Grouping tasks like this avoids the effects of task starvation (e.g. disk reads don't wait behind * webservice requests). */ +// TODO replace with kotlin coroutines and Dispatchers object AppExecutors { val diskIO: Executor = Executors.newSingleThreadExecutor() val networkIO: Executor = Executors.newFixedThreadPool(3) diff --git a/app/src/main/java/awais/instagrabber/utils/Debouncer.java b/app/src/main/java/awais/instagrabber/utils/Debouncer.java index 063e9f46..adecc66b 100644 --- a/app/src/main/java/awais/instagrabber/utils/Debouncer.java +++ b/app/src/main/java/awais/instagrabber/utils/Debouncer.java @@ -6,6 +6,7 @@ import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ScheduledFuture; import java.util.concurrent.TimeUnit; +// TODO replace with kotlinx-coroutines debounce public class Debouncer { private final ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1); private final ConcurrentHashMap delayedMap = new ConcurrentHashMap<>();