From 423cff9d9576e89deefdc72101ae5731c5f23458 Mon Sep 17 00:00:00 2001 From: kunfei Date: Tue, 1 Oct 2019 12:51:27 +0800 Subject: [PATCH] up --- .../main/java/io/legado/app/ui/book/search/SearchViewModel.kt | 2 +- .../java/io/legado/app/ui/changesource/ChangeSourceViewModel.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/book/search/SearchViewModel.kt b/app/src/main/java/io/legado/app/ui/book/search/SearchViewModel.kt index de1131371..b754f91f1 100644 --- a/app/src/main/java/io/legado/app/ui/book/search/SearchViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/book/search/SearchViewModel.kt @@ -13,7 +13,7 @@ import kotlinx.coroutines.delay import java.util.concurrent.Executors class SearchViewModel(application: Application) : BaseViewModel(application) { - private var searchPool = Executors.newFixedThreadPool(99).asCoroutineDispatcher() + private var searchPool = Executors.newFixedThreadPool(16).asCoroutineDispatcher() private var task: Coroutine<*>? = null var searchKey: String = "" var startTime: Long = 0 diff --git a/app/src/main/java/io/legado/app/ui/changesource/ChangeSourceViewModel.kt b/app/src/main/java/io/legado/app/ui/changesource/ChangeSourceViewModel.kt index f3a468da1..265dcc227 100644 --- a/app/src/main/java/io/legado/app/ui/changesource/ChangeSourceViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/changesource/ChangeSourceViewModel.kt @@ -19,7 +19,7 @@ import org.jetbrains.anko.debug import java.util.concurrent.Executors class ChangeSourceViewModel(application: Application) : BaseViewModel(application) { - private var searchPool = Executors.newFixedThreadPool(99).asCoroutineDispatcher() + private var searchPool = Executors.newFixedThreadPool(16).asCoroutineDispatcher() var callBack: CallBack? = null val searchStateData = MutableLiveData() var name: String = ""