davbeck / ImageIOSwift

Swift wrapper around ImageIO
MIT License
111 stars 15 forks source link

Anyway to create multiple downloading tasks? #5

Open gouen95 opened 5 years ago

gouen95 commented 5 years ago

Is there a way to create multiple downloading tasks? So that I can have multiple instances running at the same time to download for multiple collection cells.

davbeck commented 5 years ago

You can use ImageSourceDownloader to download as many images in parallel as you like. If you have multiple ImageSourceViews, they will each download in parallel (but actually share a download if it's the same url).

gouen95 commented 5 years ago

Cool, much appreciated for the answer. But sorry for being unclear, what I trying to ask is I found that if i assign 5 different image url into the shared downloader.. it downloads the image 1 by 1 ( or by sequence, we need to wait for one image to be done downloading before others could start ) rather than trying to download 5 of em at the same pace.