Boost logo

Boost :

From: Howard Hinnant (howard.hinnant_at_[hidden])
Date: 2007-08-20 14:54:28


Here is a link to a reference implementation and a FAQ for mutexes,
locks and condition variables I am currently anticipating proposing
for C++ standardization (or subsequent TR).

http://home.twcny.rr.com/hinnant/cpp_extensions/concurrency_rationale.html

I am posting this link here because this work draws heavily on the
boost experience, and I believe feedback from boost users would be
valuable. The documentation is scant, chiefly consisting of a "FAQ"
which largely centers around questions regarding design decisions that
differ from the boost threads package. I'm looking for both agreement
and disagreement (and why) on these design decisions from users of the
boost threading package.

One big difference between this threading package and the boost
threading package is the ability to use C++0X language features such
as rvalue reference and variadic templates. The rvalue reference is
used to make lock types movable but non-copyable. This comes in
especially handy with the "upgrade" mutex/locks (see faq). Variadic
templates are used for generic locking algorithms which can take an
arbitrary number of locks.

This code is compiled using Doug Gregor's conceptgcc.

So far, only mutexes (including read/write mutexes), locks and
conditions are addressed. Yes, C++0X will have a std::thread. It
isn't covered in the link above.

Any further questions you may supply, I may add to the FAQ (unless
there are objections).

Anyone is welcome to "boostize" any and all of this code. The
reference implementation is intended to be freely shared. However it
is currently only addressing POSIX systems. No problems are
anticipated in porting to Windows, largely due to the existing boost
thread libraries (for which I am extremely grateful to all of those
who have worked in this area).

Thank you for your time and comments.

-Howard


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk