C++ Threading Library

This is a native Windows implementation of a C++ threading library based on the proposals presented to the C++ Standards Committee, in particular N2184 by Howard Hinnant.

There are a few differences, a key one being that thread launching is done by means of the static function thread::create, rather than by use of the thread constructor. Also, the rvalue-reference operations used to provide the movability in N2184 are replaced with a custom move function. In addition to thread launching/managing, this library also includes an implementation of condition variables, call_once, and mutexes, including a read/write/upgradeable mutex.

All classes and functions are in namespace jss, in order to avoid clashing with any Boost code of the same name, as the code requires a working Boost installation, V1.33 or later.

A large part of this code is based on my contributons to the Boost thread library, which are currently in Boost CVS on the thread_rewrite branch. I hope that this implementation can provide a basis for a new version of the Boost.Thread library. The implementation of the mutex is described in my article on Implementing Synchronization Primitives for Boost on Windows.

All the required files, apart from those needed from Boost are included in the zip file. The only file that needs building is thread.cpp — just include it in your project.

This code is release under the Boost Software License Version 1.0, and comes with no warranty. At present, it is primarily intended as a proof-of-concept for the C++ Standards committee.

If you have any comments please email me