glide icon indicating copy to clipboard operation
glide copied to clipboard

Background thread pause and resume

Open aprz512 opened this issue 3 years ago • 1 comments
trafficstars

for some reason, i start a request in background thread,like this:

FutureTarget<Bitmap> futureTarget =
  Glide.with(context)
    .asBitmap()
    .load(url)
    .submit(width, height);

Bitmap bitmap = futureTarget.get();

on ui thread, i also have some images in recyclerView and i want to pause/resume all the request during filing/idle:

GlideApp.with(context).pauseRequests()
GlideApp.with(context).resumeRequests()

i found sometimes, resumeRequests do not work for the background thread request.

i guess, some concurrent thread problems happened on 'com.bumptech.glide.request.SingleRequest#status' field. so if i want to pause/resume background request, how can i do ???

aprz512 avatar Apr 22 '22 12:04 aprz512

background thread create RequestManager name applicationManager bind with application not same RequestManager with activity(or fragment )

buxuxiao avatar Jun 09 '22 08:06 buxuxiao

Can RequestManager be compatible with any other third party application? badland

gaylordpfannerstill avatar Aug 08 '23 15:08 gaylordpfannerstill