The libdispatch Project, (a.k.a. Grand Central Dispatch), for concurrency on multicore hardware
C C++ Objective-C Swift M4 Objective-C++ Other
Latest commit 967876e Jan 12, 2017 @MadCoder MadCoder committed on GitHub Merge pull request #199 from dgrove-oss/hwconfig-respect-affinity
consider affinity when computing active cpus on Linux
Permalink
Failed to load latest commit information.
config tweaks to preprocessor checks in libdispatch-685 Linux port Jul 29, 2016
dispatch Fix building on armv7 Aug 25, 2016
libdispatch.xcodeproj xcode / autoconf plumbing to select module.modulemap file Aug 12, 2016
libkqueue @ 1873b18 update libkqueue and libpwq submodules Sep 25, 2016
libpwq @ 23fba31 update libkqueue and libpwq submodules Sep 25, 2016
m4 fix help string for --enable-embedded-blocks-runtime Aug 15, 2016
man Merge libdispatch-703.1.4 Jul 29, 2016
os Merge libdispatch-703.1.4 Jul 29, 2016
private xcode / autoconf plumbing to select module.modulemap file Aug 12, 2016
resolver Import libdispatch-500.1.5 Nov 9, 2015
src consider affinity when computing active cpus on Linux Jan 12, 2017
tests Adds options to `configure` in a similar fashion and with similar Nov 27, 2016
tools Import libdispatch-500.1.5 Nov 9, 2015
xcodeconfig Merge libdispatch-685 Jun 14, 2016
xcodescripts Merge libdispatch-685 Jun 14, 2016
.gitignore xcode / autoconf plumbing to select module.modulemap file Aug 12, 2016
.gitmodules Add libkqueue as a git submodule to pick up kqueue fixes Jul 29, 2016
CONTRIBUTING.md Add legal notice for pull requests and reference to contribution guid… Dec 5, 2015
INSTALL.md update INSTALL.md and README.md Aug 10, 2016
LICENSE Update to the Swift.org license Dec 18, 2015
Makefile.am Adds options to `configure` in a similar fashion and with similar Nov 27, 2016
PATCHES Merge pull request #123 from dgrove-oss/update-build-instructions Jul 29, 2016
README.md SR-3237: Document libdispatch testsuite Nov 18, 2016
TESTING.md SR-3237: Document libdispatch testsuite Nov 18, 2016
autogen.sh Make autogen.sh executable Jun 7, 2016
configure.ac Improve swiftlibdir and swiftmoddir generation Jan 2, 2017

README.md

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 Goals

We are currently early in the development of this project. We began with a mirror of the open source drop that corresponds with OS X El Capitan (10.11) and have ported it to x86_64 Ubuntu 14.04 and 15.10. The next steps are:

  1. Complete the work to adopt libdispatch in other Core Libraries projects, especially Foundation. This will validate our work and get immediate test coverage on basic functionality of the Swift API.
  2. Include libdispatch and libdispatch-enabled Core Libraries in the Swift CI environment and the pre-built Swift toolchains at Swift.org.
  3. Develop a test suite for the Swift APIs of libdispatch.
  4. 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

Testing

For detailed instructions on testing libdispatch, see TESTING.md