Swift Concurrency — Async Await Sequences Part 2

<p>Hey everyone &nbsp;this is our second part in learning Swift&rsquo;s modern concurrency features. In this article we will learn about what AsyncSequence what does it has to offer us.</p> <p>If you haven&rsquo;t read the previous artcile you can&nbsp;<a href="https://medium.com/@amberktl004/swift-concurrency-async-await-part-1-03617a6c04dc" rel="noopener"><em>check it out here</em></a>&nbsp;it covers some basics which might be necessary for to continue this article. But if you&rsquo;re comfortable with async await then you can start from here as well.</p> <p><code>AsyncSequence</code>&nbsp;protocol is a new addition to Swift 5.5. Just like our existing&nbsp;<code>Sequence&lt;Element&gt;</code>&nbsp;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&nbsp;<code>for - in</code>&nbsp;loop and allows you to create your own custom iterator using&nbsp;<code>makeIterator()</code>&nbsp;method and calling&nbsp;<code>next()</code>&nbsp;on the iterator.&nbsp;<code>Sequence&lt;Element&gt;</code>&nbsp;is at the core of RxSwift to achieve asynchronous programming.</p> <p><a href="https://medium.com/@amberktl004/swift-concurrency-async-await-sequences-part-2-6d70e23c86c5"><strong>Click Here</strong></a></p>
Tags: Async Await