Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

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

TermsPrivacyAboutGitHubRSS
  1. Home
  2. C/C++
  3. libdispatch

libdispatch

Apache-2.0Cswift-6.4.0-RELEASE

Portable implementation of Grand Central Dispatch (GCD) for concurrent code execution on multicore hardware across Swift platforms.

Visit WebsiteGitHubGitHub
2.6k stars504 forks0 contributors

What is libdispatch?

swift-corelibs-libdispatch is the portable implementation of Apple's Grand Central Dispatch (GCD) for Swift platforms beyond Darwin. It provides comprehensive support for concurrent code execution on multicore hardware, enabling developers to write parallel programs that efficiently utilize multiple CPU cores. The project brings the proven GCD API to Linux and other platforms where Swift runs.

Target Audience

Swift developers building concurrent applications on Linux and other non-Darwin platforms, as well as maintainers of Swift core libraries who need reliable concurrency primitives.

Value Proposition

Developers choose this implementation because it provides the familiar and powerful GCD API on platforms where Apple's native version isn't available, with seamless integration into the Swift ecosystem and ongoing support from the Swift core libraries project.

Overview

The libdispatch Project, (a.k.a. Grand Central Dispatch), for concurrency on multicore hardware

Use Cases

Best For

  • Building concurrent Swift applications on Linux
  • Porting macOS/iOS GCD-based code to other platforms
  • Implementing parallel data processing in Swift
  • Developing system services that require efficient thread management
  • Creating responsive applications that utilize multicore hardware
  • Writing cross-platform Swift libraries with concurrency needs

Not Ideal For

  • Projects requiring kernel-level thread scheduling for maximum performance on Linux
  • Teams exclusively targeting macOS or iOS where native GCD is already available
  • Applications built with Swift's modern async/await concurrency that prefer higher-level abstractions

Pros & Cons

Pros

Portable GCD API

Implements the portable subset of GCD API, enabling concurrent code execution on non-Darwin platforms like Linux, as stated in the README for cross-platform Swift development.

Efficient Multicore Utilization

Manages parallel task execution across multiple CPU cores efficiently, providing comprehensive support for concurrent hardware usage, which is a core feature highlighted in the project description.

Swift Ecosystem Integration

Included in all Swift releases since Swift 3 and used by other swift-corelibs projects, ensuring seamless integration and ongoing support within the Swift community.

Active Maintenance

The project status mentions ongoing work and contributions, such as enhancing libdispatch for Swift language evolution, indicating active development and future improvements.

Cons

User-Space Limitations

On Linux, it relies on pthread primitives in user-space rather than kernel integration, which may reduce scheduling efficiency and performance compared to Darwin's native GCD.

Limited API Portability

Only the portable subset of the GCD API is implemented, potentially missing advanced features or optimizations available in Apple's full version, as admitted in the README.

Complex Setup Process

Build and installation require detailed instructions in INSTALL.md, indicating a non-trivial setup that may deter developers looking for plug-and-play concurrency solutions.

Frequently Asked Questions

Quick Stats

Stars2,605
Forks504
Contributors0
Open Issues72
Last commit1 day ago
CreatedSince 2015

Tags

#parallel-computing#thread-management#grand-central-dispatch#system-libraries#linux#concurrency#multicore#swift

Built With

p
pthread
S
Swift
C
C++

Links & Resources

Website

Included in

C/C++70.6k
Auto-fetched 14 hours ago

Related Projects

concurrentqueueconcurrentqueue

A fast multi-producer, multi-consumer lock-free concurrent queue for C++11

Stars12,525
Forks1,942
Last commit3 months ago
TaskflowTaskflow

A General-purpose Task-parallel Programming System in C++

Stars12,210
Forks1,417
Last commit9 days ago
ThreadPoolThreadPool

A simple C++11 Thread Pool implementation

Stars8,828
Forks2,337
Last commit2 years ago
NCCLNCCL

Optimized primitives for collective multi-GPU communication

Stars5,181
Forks1,452
Last commit19 hours 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