How to Create Callback-like Behavior Using AsyncStream in Swift

No more relying on closures.

Lee Kah Seng
4 min readJul 18, 2023

--

This article is originally published at swiftsenpai.com

Without a doubt, Swift Concurrency has revolutionized the way we handle asynchronous code in Swift. One powerful component of it is AsyncStream, a specialized form of AsyncSequence that is well-suited to achieve callback- or…

--

--