Kent Logo

C++CSP2

Easy Concurrency for C++


Introduction

Multicore processors have arrived on the desktop, and developers are beginning to want ways of exploiting this parallelism. The standard locks-and-threads (or monitors and threads) approach is easy to get wrong, and difficult to understand. C++CSP2 is a library that provides easy mechanisms for concurrent C++ programming. The CSP-derived approach is to eliminate sharing of data between concurrent processes. Processes are separate pieces of code that communicate explicitly via channels. When programming a process, you only need to consider the channel communications (and other synchronisations, such as barriers), and do not need to worry about race hazards involving shared data or scheduling corner-cases.

Documentation

C++CSP2 has a respectable amount of documentation; see the index page for the online C++CSP2 reference. There is both API documentation for all the C++CSP2 classes, and a guide to C++CSP2. You can browse the documentation online using those links, or you can download all of the documentation to browse offline.

Download

There are two bundles to choose from to download:

Information

C++CSP2 is known to work on Windows 2000 SP4, Windows XP 32-bit and 64-bit, and should work on Vista and Windows 7 and 8 (32- and 64-bit). C++CSP2 works on x86 and x86-64 processors on GNU/Linux (2.6 kernel using NPTL recommended). C++CSP2 also works on Mac OS X (since 2.0.3). C++CSP2 does not work on the BSD operating systems. C++CSP2 is licensed under the GNU Lesser General Public Licence (LGPL).

C++CSP2 replaces C++CSP v1 and makes many changes to the API. For users who want to migrate from C++CSP v1 to C++CSP2, a migration guide is provided in the documentation.

Repository

The source repository for C++CSP2 is now publicly available via Subversion. To get hold of a copy:

svn checkout http://projects.cs.kent.ac.uk/projects/cppcsp/svn/cppcsp2/trunk/

Citation

If you want to cite C++CSP2, this is the most appropriate reference:

 @InProceedings{Brown07,
  title =        "{C}++{CSP}2: {A} {M}any-to-{M}any {T}hreading {M}odel for {M}ulticore {A}rchitectures",
  author=        "Brown,  Neil C. C.",
  editor=        "McEwan,  Alistair A. and Ifill,  Wilson and Welch, Peter H.",
  pages =        "183--205",
  booktitle=     "{C}ommunicating {P}rocess {A}rchitectures 2007",
  isbn=          "978-1586037673",
  year=          "2007",
  month=         "jul",
}

News

11th May 2007: C++CSP2 v2.0.1 released.

20th August 2007: C++CSP2 v2.0.2 released. Fixes bugs relating to timeouts in Alternatives, repeated channel guards in Alternatives, and the Run methods.

5th November 2007: C++CSP2 v2.0.3 released. Support for Mac OS X has now been added.

17th March 2008: C++CSP2 v2.0.4 released. Build process is now cleaner, and support for pkg-config has been added.

29th January 2009: C++CSP2 v2.0.5 released. Fixed an error with a recent GCC that is more picky about the C++ standard .

10th May 2013: C++CSP2 v2.0.6 released. Stopped using setjmp/longjmp for user-threading on Linux, as that was no longer working on modern Linux systems.

This page copyright Neil Brown, 2007-2009.