pull/51/head
kunfei 5 years ago
parent f18c200ca9
commit 0ee98d6c93
  1. 4
      app/src/main/java/io/legado/app/service/DownloadService.kt

@ -7,8 +7,11 @@ import io.legado.app.base.BaseService
import io.legado.app.constant.Action import io.legado.app.constant.Action
import io.legado.app.constant.AppConst import io.legado.app.constant.AppConst
import io.legado.app.help.IntentHelp import io.legado.app.help.IntentHelp
import kotlinx.coroutines.asCoroutineDispatcher
import java.util.concurrent.Executors
class DownloadService : BaseService() { class DownloadService : BaseService() {
private var searchPool = Executors.newFixedThreadPool(16).asCoroutineDispatcher()
override fun onCreate() { override fun onCreate() {
super.onCreate() super.onCreate()
@ -27,6 +30,7 @@ class DownloadService : BaseService() {
override fun onDestroy() { override fun onDestroy() {
super.onDestroy() super.onDestroy()
searchPool.close()
} }
private fun download() { private fun download() {

Loading…
Cancel
Save