Add a small delay between download and decode job launch

This commit is contained in:
tarsin committed 2023-02-14 14:07:21 +08:00
1 parent 032563d7a4
commit 802a30e16c
1 file changed
+1
@@ -313,6 +313,7 @@ class SpiderQueenWorker(private val queen: SpiderQueen) : CoroutineScope {
val currentJob = mDecodeJobMap[index]
if (currentJob?.isActive != true) {
mDecodeJobMap[index] = launch {
delay(100)
mFetcherJobMap[index]?.takeIf { it.isActive }?.join()
mSemaphore.withPermit {
doInJob(index)