bumptech / bumptech/glide

downloadOnly method in multi thread maybe ANR

Open
#5,311 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
35k
Forks
6.2k
Avg merge
1d 11h
Merged PRs (30d)
8

Description

version:4.16.0
I just want to use the downloadOnly method to downlaod a large number pics(more then 3000),i use one background thread it working very well,but a little slow, so i give one thread with one downloadOnly ask, but ANR happened sometimes,i need help,how can i solve the problem?please。
the log has a lot of object waiting:

`"glide-active-resources" prio=5 tid=30 Waiting
| group="main" sCount=1 ucsCount=0 flags=1 obj=0x12d02a90 self=0x70858c6ca290
| sysTid=7304 nice=10 cgrp=default sched=0/0 handle=0x7083f310bcf0
| state=S schedstat=( 175835 61626 3 ) utm=0 stm=0 core=2 HZ=100
| stack=0x7083f3009000-0x7083f300b000 stackSize=1035KB
| held mutexes=
at java.lang.Object.wait(Native method)
- waiting on <0x05243ab3> (a java.lang.Object)
at java.lang.Object.wait(Object.java:442)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:190)
- locked <0x05243ab3> (a java.lang.Object)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:211)
at com.bumptech.glide.load.engine.ActiveResources.cleanReferenceQueue(ActiveResources.java:128)
at com.bumptech.glide.load.engine.ActiveResources$2.run(ActiveResources.java:61)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at com.bumptech.glide.load.engine.ActiveResources$1$1.run(ActiveResources.java:43)
at java.lang.Thread.run(Thread.java:920)`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.