The libdispatch Project, (a.k.a. Grand Central Dispatch), for concurrency on multicore hardware
C C++ Swift Objective-C CMake M4 Other
Switch branches/tags
swift-DEVELOPMENT-SNAPSHOT-2017-11-22-a swift-DEVELOPMENT-SNAPSHOT-2017-11-21-a swift-DEVELOPMENT-SNAPSHOT-2017-11-16-a swift-DEVELOPMENT-SNAPSHOT-2017-11-14-a swift-DEVELOPMENT-SNAPSHOT-2017-11-13-a swift-DEVELOPMENT-SNAPSHOT-2017-11-09-a swift-DEVELOPMENT-SNAPSHOT-2017-11-08-a swift-DEVELOPMENT-SNAPSHOT-2017-11-07-a swift-DEVELOPMENT-SNAPSHOT-2017-11-06-a swift-DEVELOPMENT-SNAPSHOT-2017-11-05-a swift-DEVELOPMENT-SNAPSHOT-2017-11-04-a swift-DEVELOPMENT-SNAPSHOT-2017-11-03-a swift-DEVELOPMENT-SNAPSHOT-2017-11-02-a swift-DEVELOPMENT-SNAPSHOT-2017-11-01-a swift-DEVELOPMENT-SNAPSHOT-2017-10-31-a swift-DEVELOPMENT-SNAPSHOT-2017-10-30-a swift-DEVELOPMENT-SNAPSHOT-2017-10-29-a swift-DEVELOPMENT-SNAPSHOT-2017-10-28-a swift-DEVELOPMENT-SNAPSHOT-2017-10-27-a swift-DEVELOPMENT-SNAPSHOT-2017-10-26-a swift-DEVELOPMENT-SNAPSHOT-2017-10-25-a swift-DEVELOPMENT-SNAPSHOT-2017-10-24-a swift-DEVELOPMENT-SNAPSHOT-2017-10-23-a swift-DEVELOPMENT-SNAPSHOT-2017-10-22-a swift-DEVELOPMENT-SNAPSHOT-2017-10-21-a swift-DEVELOPMENT-SNAPSHOT-2017-10-20-a swift-DEVELOPMENT-SNAPSHOT-2017-10-19-a swift-DEVELOPMENT-SNAPSHOT-2017-10-18-a swift-DEVELOPMENT-SNAPSHOT-2017-10-17-a swift-DEVELOPMENT-SNAPSHOT-2017-10-16-a swift-DEVELOPMENT-SNAPSHOT-2017-10-15-a swift-DEVELOPMENT-SNAPSHOT-2017-10-14-a swift-DEVELOPMENT-SNAPSHOT-2017-10-12-a swift-DEVELOPMENT-SNAPSHOT-2017-10-10-a swift-DEVELOPMENT-SNAPSHOT-2017-10-09-a swift-DEVELOPMENT-SNAPSHOT-2017-10-08-a swift-DEVELOPMENT-SNAPSHOT-2017-10-07-a swift-DEVELOPMENT-SNAPSHOT-2017-10-06-a swift-DEVELOPMENT-SNAPSHOT-2017-09-30-a swift-DEVELOPMENT-SNAPSHOT-2017-09-29-a swift-DEVELOPMENT-SNAPSHOT-2017-09-28-a swift-DEVELOPMENT-SNAPSHOT-2017-09-27-a swift-DEVELOPMENT-SNAPSHOT-2017-09-26-a swift-DEVELOPMENT-SNAPSHOT-2017-09-25-a swift-DEVELOPMENT-SNAPSHOT-2017-09-24-a swift-DEVELOPMENT-SNAPSHOT-2017-09-23-a swift-DEVELOPMENT-SNAPSHOT-2017-09-22-a swift-DEVELOPMENT-SNAPSHOT-2017-09-21-a swift-DEVELOPMENT-SNAPSHOT-2017-09-20-a swift-DEVELOPMENT-SNAPSHOT-2017-09-19-a swift-DEVELOPMENT-SNAPSHOT-2017-09-18-a swift-DEVELOPMENT-SNAPSHOT-2017-09-17-a swift-DEVELOPMENT-SNAPSHOT-2017-09-16-a swift-DEVELOPMENT-SNAPSHOT-2017-09-15-a swift-DEVELOPMENT-SNAPSHOT-2017-09-14-a swift-DEVELOPMENT-SNAPSHOT-2017-09-13-a swift-DEVELOPMENT-SNAPSHOT-2017-09-12-a swift-DEVELOPMENT-SNAPSHOT-2017-09-11-a swift-DEVELOPMENT-SNAPSHOT-2017-09-10-a swift-DEVELOPMENT-SNAPSHOT-2017-09-09-a swift-DEVELOPMENT-SNAPSHOT-2017-09-08-a swift-DEVELOPMENT-SNAPSHOT-2017-09-07-a swift-DEVELOPMENT-SNAPSHOT-2017-09-06-a swift-DEVELOPMENT-SNAPSHOT-2017-09-05-a swift-DEVELOPMENT-SNAPSHOT-2017-09-04-a swift-DEVELOPMENT-SNAPSHOT-2017-09-03-a swift-DEVELOPMENT-SNAPSHOT-2017-09-02-a swift-DEVELOPMENT-SNAPSHOT-2017-09-01-a swift-DEVELOPMENT-SNAPSHOT-2017-08-21-a swift-DEVELOPMENT-SNAPSHOT-2017-08-15-a swift-DEVELOPMENT-SNAPSHOT-2017-08-14-a swift-DEVELOPMENT-SNAPSHOT-2017-08-03-a swift-DEVELOPMENT-SNAPSHOT-2017-08-02-a swift-DEVELOPMENT-SNAPSHOT-2017-08-01-a swift-DEVELOPMENT-SNAPSHOT-2017-07-31-a swift-DEVELOPMENT-SNAPSHOT-2017-07-30-a swift-DEVELOPMENT-SNAPSHOT-2017-07-29-a swift-DEVELOPMENT-SNAPSHOT-2017-07-28-a swift-DEVELOPMENT-SNAPSHOT-2017-07-27-a swift-DEVELOPMENT-SNAPSHOT-2017-07-26-a swift-DEVELOPMENT-SNAPSHOT-2017-07-24-a swift-DEVELOPMENT-SNAPSHOT-2017-07-23-a swift-DEVELOPMENT-SNAPSHOT-2017-07-22-a swift-DEVELOPMENT-SNAPSHOT-2017-07-20-a swift-DEVELOPMENT-SNAPSHOT-2017-07-19-a swift-DEVELOPMENT-SNAPSHOT-2017-07-13-a swift-DEVELOPMENT-SNAPSHOT-2017-07-12-a swift-DEVELOPMENT-SNAPSHOT-2017-07-11-a swift-DEVELOPMENT-SNAPSHOT-2017-07-10-a swift-DEVELOPMENT-SNAPSHOT-2017-07-09-a swift-DEVELOPMENT-SNAPSHOT-2017-07-08-a swift-DEVELOPMENT-SNAPSHOT-2017-07-07-a swift-DEVELOPMENT-SNAPSHOT-2017-07-06-a swift-DEVELOPMENT-SNAPSHOT-2017-07-05-a swift-DEVELOPMENT-SNAPSHOT-2017-07-04-a swift-DEVELOPMENT-SNAPSHOT-2017-07-03-a swift-DEVELOPMENT-SNAPSHOT-2017-07-02-a swift-DEVELOPMENT-SNAPSHOT-2017-07-01-a swift-DEVELOPMENT-SNAPSHOT-2017-06-30-a swift-DEVELOPMENT-SNAPSHOT-2017-06-29-a
Nothing to show
Latest commit e245cbe Nov 13, 2017 @MadCoder MadCoder Merge pull request #320 from apple/jblache/clock_monotonic
Base approximate time on a monotonic clock, like absolute time
Permalink
Failed to load latest commit information.
cmake build: improve cross-compilation for android Oct 21, 2017
config Merge libdispatch-806 Feb 21, 2017
dispatch [CMake] Use a custom variable for libdir path Oct 20, 2017
libdispatch.xcodeproj merge darwin/libdispatch-913.1.4 Jul 31, 2017
m4 fix help string for --enable-embedded-blocks-runtime Aug 15, 2016
man Merge libdispatch-913.1.4 Jul 31, 2017
os [CMake] Use a custom variable for libdir path Oct 20, 2017
private Fix documentation warning in queue_private.h Oct 11, 2017
resolver Import libdispatch-500.1.5 Nov 9, 2015
src Restrict use of CLOCK_MONOTONIC clock sources to Linux Nov 13, 2017
tests A few updates to enable building on Raspberry PI/Ubuntu 16.04 Oct 25, 2017
tools Merge libdispatch-913.1.4 Jul 31, 2017
xcodeconfig Merge libdispatch-913.1.4 Jul 31, 2017
xcodescripts Merge libdispatch-743 Feb 21, 2017
.gitignore xcode / autoconf plumbing to select module.modulemap file Aug 12, 2016
.gitmodules implement pthread_workqueue within libdispatch May 25, 2017
CMakeLists.txt build: improve cross-compilation for android Oct 21, 2017
CONTRIBUTING.md Add legal notice for pull requests and reference to contribution guid… Dec 5, 2015
INSTALL.md docs: update documentation to show how to use CMake Sep 19, 2017
LICENSE Update to the Swift.org license Dec 18, 2015
Makefile.am implement pthread_workqueue within libdispatch May 25, 2017
PATCHES Merge pull request #273 from dgrove-oss/match-darwin-cflags-round1 Jul 31, 2017
README.md update README and INSTALL for libpwq removal May 19, 2017
TESTING.md SR-3237: Document libdispatch testsuite Nov 18, 2016
autogen.sh Make autogen.sh executable Jun 7, 2016
configure.ac Base approximate time on a monotonic clock, like absolute time Nov 13, 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 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

Testing

For detailed instructions on testing libdispatch, see TESTING.md