瀏覽代碼

Add backpressure buffer for downloads

inorichi 9 年之前
父節點
當前提交
0e87dc995a
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadManager.java

+ 1 - 0
app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadManager.java

@@ -78,6 +78,7 @@ public class DownloadManager {
         downloadsSubscription = downloadsQueueSubject
                 .flatMap(Observable::from)
                 .lift(new DynamicConcurrentMergeOperator<>(this::downloadChapter, threadsSubject))
+                .onBackpressureBuffer()
                 .observeOn(AndroidSchedulers.mainThread())
                 .map(download -> areAllDownloadsFinished())
                 .subscribe(finished -> {