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

Subscribe to updates I use swift-corelibs-libdispatch

Statistics on swift-corelibs-libdispatch

Number of watchers on Github 1156
Number of open issues 6
Main language C
Average time to merge a PR 2 days
Open pull requests 43+
Closed pull requests 42+
Last commit 11 months ago
Repo Created about 3 years ago
Repo Last Updated 10 months ago
Size 2.77 MB
Homepage swift.org
Organization / Authorapple
Page Updated
Do you use swift-corelibs-libdispatch? Leave a review!
View open issues (6)
View swift-corelibs-libdispatch activity
View on github
Fresh, new opensource launches 🚀🚀🚀
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating swift-corelibs-libdispatch for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)

Grand Central Dispatch

Grand Central Dispatch (GCD or libdispatch) provides comprehensive support for concurrent code execution on multicore hardware.

libdispatch is currently available on all Darwin platforms. This project aims to make a modern version of libdispatch available on all other Swift platforms. To do this, we will implement as much of the portable subset of the API as possible, using the existing open source C implementation.

libdispatch on Darwin is a combination of logic in the xnu kernel alongside the user-space Library. The kernel has the most information available to balance workload across the entire system. As a first step, however, we believe it is useful to bring up the basic functionality of the library using user-space pthread primitives on Linux. Eventually, a Linux kernel module could be developed to support more informed thread scheduling.

Project Status

A port of libdispatch to Linux has been completed. On Linux, since Swift 3, swift-corelibs-libdispatch has been included in all Swift releases and is used by other swift-corelibs projects.

Opportunities to contribute and on-going work include:

  1. Develop a test suite for the Swift APIs of libdispatch.
  2. Enhance libdispatch as needed to support Swift language evolution and the needs of the other Core Libraries projects.

Build and Install

For detailed instructions on building and installing libdispatch, see INSTALL.md


For detailed instructions on testing libdispatch, see TESTING.md

swift-corelibs-libdispatch open pull requests (View All Pulls)
  • if building Swift overlay, install into Swift toolchain dir structure
  • Add support for CFRunLoop integration APIs
  • introduce usage of thread local storage structure
  • Add clean failure for EVFILT_PROC usage
  • SR-1101 : clang 3.9 doesn't allow typeof on bit-field
  • guard pthread_workqueue_signal_np calls
  • Another fix for libpwq configuration
  • Build fix for Linux overlay with 03242016 compiler.
  • Rework of Dispatch overlay for Linux
  • Upgrade to latest libpwq dependency to solve 1-cpu issues, and scalability test case issues.
  • Removed uses of deprecated @warn_unused_result attr
  • Linux port of libdispatch-685 merge
  • Initial Swift3 wrapping overlay for libdispatch
  • Move dispatch_concur and dispatch_readsync to the XFAIL list
  • relax passing conditions for dispatch_concur
  • [overlay-syncup] sync overlay changes to Linux
  • README - Added Toolchain section
  • Update deliveries value atomically to avoid potential race condition
  • Use shims for all calls to Dispatch APIs that take blocks
  • [Data] Fixed crash when getting pointer to empty DispatchData
  • More changes for SE-0103 (@noescape by default).
  • Fix building on armv7
  • Android support
  • Fix Swift dispatch time comparisons
  • [Overlay/Queue]: Allow setting an optional value in setSpecific
  • SR-3002: DispatchData.enumerateBytes on Linux leaks the block
  • SR-3237: Document libdispatch testsuite
  • build: add a cmake based build system
  • Replace uses of @_silgen_name with uses of a shims header.
  • Create a DISPATCH_PTR_SIZE macro and use it
  • build: attempt to add swift support to cmake
  • [Cherry Pick] lock: Avoid use of undefined DISPATCH_INTERNAL_CRASH
  • SR-4201: DispatchSourceSignal not working on Linux
  • DispatchSourceTimer: deprecate scheduleOneShot()/scheduleRepeating() …
  • implement pthread_workqueue within libdispatch
  • Thread detach hook for Java JNI on Android
  • Fix build for android
  • Added build-android script which will build libdispatch for Android
  • [TLS]: Pass a heap-allocated value to pthread_setspecific()
  • revive the Windows port
  • protect unistd.h inclusion with HAVE_UNISTD_H
  • [gardening] Use `Optional.map` over `flatMap` where appropriate
  • Add support for 32-bit Ubuntu
swift-corelibs-libdispatch list of languages used
Other projects in C