mirror of
https://github.com/KokaKiwi/BarInsta
synced 2024-12-23 05:16:58 +00:00
Add some TODO
This commit is contained in:
parent
7ca0d513dc
commit
51f3a348b7
@ -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)
|
||||
|
@ -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<T> {
|
||||
private final ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1);
|
||||
private final ConcurrentHashMap<T, TimerTask> delayedMap = new ConcurrentHashMap<>();
|
||||
|
Loading…
Reference in New Issue
Block a user