The C++ interface to the Dinkum Threads Library is very similar to the
thread support interface defined in the
boost.threads
library for C++.
Some details of this implementation differ from
the boost.threads implementation. For example, in this implementation classes and
functions are enclosed in namespace Dinkum/threads instead of
namespace boost. Implementation differences are marked as such,
throughout this document, by a link to this paragraph.
The C++ interface consists of several headers:
"Dinkum/threads/condition"
-- for defining a class that implements condition variables"Dinkum/threads/exceptions"
-- for defining several classes useful for reporting exceptions"Dinkum/threads/mutex"
-- for defining classes that implement mutual exclusion"Dinkum/threads/once"
-- for ensuring that initialization code is executed only once, from the first
thread that needs the initialization"Dinkum/threads/recursive_mutex"
-- for defining classes that implement mutual exclusion"Dinkum/threads/thread"
-- for defining classes to manage execution threads and groups of
execution threads"Dinkum/threads/tss"
-- for defining a template class that supports thread-specific data"Dinkum/threads/xtime"
-- for defining a struct and functions for high-resolution time operationsHere is an example program to illustrate the use of the C++ interface.
The C++ interface makes suitable use of templates and classes, but its functionality is otherwise quite similar to that described for the C interface.
See also the Table of Contents and the Index.
Copyright (c) by P.J. Plauger. All rights reserved.