summaryrefslogtreecommitdiff
path: root/doc/html/thread.html
blob: 74aa966428b3960e0045a29e7646933aa633d914 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Chapter&#160;28.&#160;Thread</title>
<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="libraries.html" title="Part&#160;I.&#160;The Boost C++ Libraries (BoostBook Subset)">
<link rel="prev" href="string_algo/credits.html" title="Credits">
<link rel="next" href="thread/changes.html" title="Changes since">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../boost.png"></td>
<td align="center"><a href="../../index.html">Home</a></td>
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="string_algo/credits.html"><img src="../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="libraries.html"><img src="../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="thread/changes.html"><img src="../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="chapter">
<div class="titlepage"><div>
<div><h2 class="title">
<a name="thread"></a>Chapter&#160;28.&#160;Thread</h2></div>
<div><div class="authorgroup"><div class="author"><h3 class="author">
<span class="firstname">Anthony</span> <span class="surname">Williams</span>
</h3></div></div></div>
<div><p class="copyright">Copyright &#169; 2007 -8 Anthony Williams</p></div>
<div><div class="legalnotice">
<a name="thread.legal"></a><p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div></div>
</div></div>
<div class="toc">
<p><b>Table of Contents</b></p>
<dl>
<dt><span class="section"><a href="thread.html#thread.overview">Overview</a></span></dt>
<dt><span class="section"><a href="thread/changes.html">Changes since</a></span></dt>
<dt><span class="section"><a href="thread/future.html">Future</a></span></dt>
<dt><span class="section"><a href="thread/thread_management.html">Thread Management</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="thread/thread_management.html#thread.thread_management.thread">Class <code class="computeroutput"><span class="identifier">thread</span></code></a></span></dt>
<dt><span class="section"><a href="thread/thread_management.html#thread.thread_management.this_thread">Namespace <code class="computeroutput"><span class="identifier">this_thread</span></code></a></span></dt>
<dt><span class="section"><a href="thread/thread_management.html#thread.thread_management.threadgroup">Class <code class="computeroutput"><span class="identifier">thread_group</span></code></a></span></dt>
</dl></dd>
<dt><span class="section"><a href="thread/synchronization.html">Synchronization</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="thread/synchronization.html#thread.synchronization.mutex_concepts">Mutex Concepts</a></span></dt>
<dt><span class="section"><a href="thread/synchronization.html#thread.synchronization.locks">Lock Types</a></span></dt>
<dt><span class="section"><a href="thread/synchronization.html#thread.synchronization.lock_functions">Lock functions</a></span></dt>
<dt><span class="section"><a href="thread/synchronization.html#thread.synchronization.mutex_types">Mutex Types</a></span></dt>
<dt><span class="section"><a href="thread/synchronization.html#thread.synchronization.condvar_ref">Condition Variables</a></span></dt>
<dt><span class="section"><a href="thread/synchronization.html#thread.synchronization.once">One-time Initialization</a></span></dt>
<dt><span class="section"><a href="thread/synchronization.html#thread.synchronization.barriers">Barriers</a></span></dt>
<dt><span class="section"><a href="thread/synchronization.html#thread.synchronization.futures">Futures</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="thread/thread_local_storage.html">Thread Local Storage</a></span></dt>
<dd><dl><dt><span class="section"><a href="thread/thread_local_storage.html#thread.thread_local_storage.thread_specific_ptr">Class
      <code class="computeroutput"><span class="identifier">thread_specific_ptr</span></code></a></span></dt></dl></dd>
<dt><span class="section"><a href="thread/time.html">Date and Time Requirements</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="thread/time.html#thread.time.system_time">Typedef <code class="computeroutput"><span class="identifier">system_time</span></code></a></span></dt>
<dt><span class="section"><a href="thread/time.html#thread.time.get_system_time">Non-member function <code class="computeroutput"><span class="identifier">get_system_time</span><span class="special">()</span></code></a></span></dt>
</dl></dd>
<dt><span class="section"><a href="thread/acknowledgements.html">Acknowledgments</a></span></dt>
<dt><span class="section"><a href="thread/compliance.html">Compliance with standard</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="thread/compliance.html#thread.compliance.cpp11">C++11 standard Thread library</a></span></dt>
<dt><span class="section"><a href="thread/compliance.html#thread.compliance.shared">Shared Mutex library extension</a></span></dt>
</dl></dd>
</dl>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="thread.overview"></a><a class="link" href="thread.html#thread.overview" title="Overview">Overview</a>
</h2></div></div></div>
<p>
      <span class="bold"><strong>Boost.Thread</strong></span> enables the use of multiple threads
      of execution with shared data in portable C++ code. It provides classes and
      functions for managing the threads themselves, along with others for synchronizing
      data between the threads or providing separate copies of data specific to individual
      threads.
    </p>
<p>
      The <span class="bold"><strong>Boost.Thread</strong></span> library was originally written
      and designed by William E. Kempf. This version is a major rewrite designed
      to closely follow the proposals presented to the C++ Standards Committee, in
      particular <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2497.html" target="_top">N2497</a>,
      <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2320.html" target="_top">N2320</a>,
      <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2184.html" target="_top">N2184</a>,
      <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2139.html" target="_top">N2139</a>,
      and <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2094.html" target="_top">N2094</a>
    </p>
<p>
      In order to use the classes and functions described here, you can either include
      the specific headers specified by the descriptions of each class or function,
      or include the master thread library header:
    </p>
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">thread</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
</pre>
<p>
      which includes all the other headers in turn.
    </p>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer"></div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="string_algo/credits.html"><img src="../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="libraries.html"><img src="../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="thread/changes.html"><img src="../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>