best way to get multiple images?
longbowww opened this issue · 1 comments
longbowww commented
Is the ImageManager queueable? Are multiple manager calls concurrent and finish up 'fcfs' or one after the other?
So to say, what happens if you do something like:
ImageManager.fetch(img1, progress: { (progress: Double) in
}, success: { (data: NSData) in
myImage1 = UIImage(data:data)
//do whatever stuff with image
}, failure: { (error: NSError) in
println(error)
})
ImageManager.fetch(img2, progress: { (progress: Double) in
}, success: { (data: NSData) in
myImage2 = UIImage(data:data)
//do whatever stuff with image
}, failure: { (error: NSError) in
println(error)
})
daltoniam commented
The are not queuable as they use Apple's NSURLSession download APIs. The system handles the request after scheduling the downloads. That being said, the fetch requests are concurrent, so calling fetch twice like in the example above, will cause both images to be fetch concurrently.