Swift Concurrency ??? Async Await Sequences Part 2

Hey everyone  this is our second part in learning Swift’s modern concurrency features. In this article we will learn about what AsyncSequence what does it has to offer us.

If you haven’t read the previous artcile you can check it out here it covers some basics which might be necessary for to continue this article. But if you’re comfortable with async await then you can start from here as well.

AsyncSequence protocol is a new addition to Swift 5.5. Just like our existing Sequence<Element> protocol which allows you to have a list of Element type and perform any operations iteratively on that sequence. One of the operations you may know is for - in loop and allows you to create your own custom iterator using makeIterator() method and calling next() on the iterator. Sequence<Element> is at the core of RxSwift to achieve asynchronous programming.

Click Here

Tags: Async Await