Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. iOS
  3. SwiftCoroutine

SwiftCoroutine

MITSwift2.1.11

A Swift framework implementing coroutines with async/await, futures, and channels for iOS, macOS, and Linux.

Visit WebsiteGitHubGitHub
832 stars50 forks0 contributors

What is SwiftCoroutine?

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.

Target Audience

Swift developers building asynchronous applications for Apple platforms or Linux who want to avoid callback-based async code and use modern coroutine patterns.

Value Proposition

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.

Overview

Swift coroutines for iOS, macOS and Linux.

Use Cases

Best For

  • Writing asynchronous Swift code without nested callbacks or pyramids of doom
  • Implementing async/await patterns in Swift before native language support
  • Managing concurrent tasks with futures and channels in iOS/macOS apps
  • Performing non-blocking network requests or heavy computations on background threads
  • Structuring asynchronous logic in a synchronous, readable manner
  • Building cross-platform Swift applications that require coroutine-based concurrency

Not Ideal For

  • Projects already using Swift 5.5+ that can leverage native async/await support
  • Teams heavily invested in Apple's Combine or RxSwift for reactive programming paradigms
  • Applications requiring extensive third-party library integration with official concurrency frameworks
  • Developers who prioritize long-term maintenance with Swift's evolving language features over third-party solutions

Pros & Cons

Pros

First Coroutine Implementation

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.

Lock-Free Performance

Uses only atomic primitives for synchronization, avoiding locks entirely, which ensures high-performance context switching and non-blocking operations.

Minimalistic API Design

The API is intentionally minimalistic, with easy integration into existing schedulers like DispatchQueue, reducing boilerplate code for asynchronous tasks.

Comprehensive Concurrency Tools

Includes futures, promises, and channels—similar to Go and Kotlin—providing a full suite for managing asynchronous operations and data streams within coroutines.

Cons

Superseded by Native Support

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.

Limited Ecosystem and Community

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.

Complex Error Handling Overhead

While it simplifies error handling compared to callbacks, the framework requires manual management of CoScope for cancellation and lifecycle, adding complexity in larger applications.

Frequently Asked Questions

Quick Stats

Stars832
Forks50
Contributors0
Open Issues6
Last commit4 years ago
CreatedSince 2019

Tags

#futures#ios#async-await#non-blocking#channels#coroutines#coroutine#async#promises#combine#futures-promises#linux#concurrency#await#swift#macos

Built With

S
Swift

Links & Resources

Website

Included in

iOS51.7kSwift26.0k
Auto-fetched 18 hours ago

Related Projects

HydraHydra

⚡️ Lightweight full-featured Promises, Async & Await Library in Swift

Stars2,003
Forks115
Last commit4 years ago
VeniceVenice

Coroutines, structured concurrency and CSP for Swift on macOS and Linux.

Stars1,497
Forks57
Last commit7 years ago
QueuerQueuer

Queuer is a queue manager, built on top of OperationQueue and Dispatch (aka GCD).

Stars1,157
Forks46
Last commit8 days ago
OverdriveOverdrive

⚡️ Fast async task based Swift framework with focus on type safety, concurrency and multi threading

Stars800
Forks28
Last commit8 years ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub