A File Download Queue in Combine for Swift
Published on
Combine allows us to create pipelines for a lot of tasks. Thanks to the fact it can do work concurrently without leveraging callbacks, it is very easy to build things that would otherwise be very complex.
In this short article, we will build a file download queue that downloads images sequentially. You can use this as the base for more complex queues.
The queue will download an array of images sequentially. If you wanted to support concurrent queues, it would probably be wise to instantiate this publisher as many times as necessary.