A Swift framework implementing coroutines with async/await, futures, and channels for iOS, macOS, and Linux.
SwiftCoroutine is a framework that implements coroutines for Swift, enabling the async/await pattern on iOS, macOS, and Linux. It solves problems like callback hell and complex error handling by allowing asynchronous code to be written in a synchronous, linear style. The framework includes futures, promises, and channels to complement coroutines for flexible concurrency management.
Swift developers building asynchronous applications for Apple platforms or Linux who want to avoid callback-based async code and use modern coroutine patterns.
Developers choose SwiftCoroutine because it's the first coroutine implementation for Swift, offers a lock-free design with atomic primitives, and provides a minimalistic API that integrates seamlessly with existing DispatchQueue and other schedulers without requiring language changes.
Swift coroutines for iOS, macOS and Linux.
It's the first framework to bring coroutines to Swift, enabling async/await patterns on iOS, macOS, and Linux without language changes, as highlighted in the README.
Uses only atomic primitives for synchronization, avoiding locks entirely, which ensures high-performance context switching and non-blocking operations.
The API is intentionally minimalistic, with easy integration into existing schedulers like DispatchQueue, reducing boilerplate code for asynchronous tasks.
Includes futures, promises, and channels—similar to Go and Kotlin—providing a full suite for managing asynchronous operations and data streams within coroutines.
With Swift 5.5 introducing native async/await, SwiftCoroutine becomes less necessary for new projects on supported platforms, potentially leading to maintenance and adoption issues.
As a third-party framework, it has a smaller community and fewer integrations compared to official solutions like Combine, which can hinder support and third-party compatibility.
While it simplifies error handling compared to callbacks, the framework requires manual management of CoScope for cancellation and lifecycle, adding complexity in larger applications.
⚡️ Lightweight full-featured Promises, Async & Await Library in Swift
Coroutines, structured concurrency and CSP for Swift on macOS and Linux.
Queuer is a queue manager, built on top of OperationQueue and Dispatch (aka GCD).
⚡️ Fast async task based Swift framework with focus on type safety, concurrency and multi threading
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.