ios - Alamofire Priority Queue -


i using alamofire networking library swift app. there way keep "priority queue" of network requests alamofire? believe saw feature in library in past can no longer find or find other posts this.

let's open page in application , starts make few requests. first gets json, fast , no problem.

from json, pulls out information , starts downloading images. these images have potential quite large , take many seconds (~30 seconds or more sometimes). tricky part user has option move on next page before image(s) finish downloading.

if user moves on next page before image downloading done, possible move on lower priority queue? when images on next page start loading go faster? open pausing old 1 entirely until new requests finished if possible.

keep in mind open many suggestions. have lot of freedom implementation. if different library, or different mechanism in ios fine. if continue use alamofire json , image downloading , management else alright too.

also, irrelevant add here. i'm using https://github.com/rs/sdwebimage caching images once they're downloaded. why don't want cancel request completely. need finish , won't happen again.

tl;dr want fast queue , slow queue ability move things fast queue slow queue before finished.

have considered managing nsoperationqueue? tutorial might helpful. in example, pauses downloads scroll off page, believe adjust queuepriority property of nsoperation objects instead.


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -