summaryrefslogtreecommitdiff
path: root/doc/html/thread_group.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/html/thread_group.html')
-rw-r--r--doc/html/thread_group.html132
1 files changed, 132 insertions, 0 deletions
diff --git a/doc/html/thread_group.html b/doc/html/thread_group.html
new file mode 100644
index 0000000000..24c13db404
--- /dev/null
+++ b/doc/html/thread_group.html
@@ -0,0 +1,132 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Class thread_group</title>
+<link rel="stylesheet" href="boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
+<link rel="start" href="index.html" title="The Boost C++ Libraries">
+<link rel="up" href="threads/reference.html#id1248802" title="Header &lt;boost/thread/thread.hpp&gt;">
+<link rel="prev" href="thread.html" title="Class thread">
+<link rel="next" href="thread_specific_ptr.html" title="Class thread_specific_ptr">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%">
+<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
+<td align="center"><a href="../../index.htm">Home</a></td>
+<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
+<td align="center"><a href="../../people/people.htm">People</a></td>
+<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
+<td align="center"><a href="../../more/index.htm">More</a></td>
+</table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="thread.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="threads/reference.html#id1248802"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="thread_specific_ptr.html"><img src="images/next.png" alt="Next"></a>
+</div>
+<div class="refentry" lang="en">
+<a name="thread_group"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Class thread_group</span></h2>
+<p>boost::thread_group &#8212;
+ The <a href="thread_group.html" title="Class thread_group">thread_group</a> class provides a container
+ for easy grouping of threads to simplify several common thread
+ creation and management idioms.
+ </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis">
+<span class="bold"><strong>class</strong></span> thread_group : <span class="bold"><strong>private</strong></span> boost::noncopyable <span class="emphasis"><em>// Exposition only</em></span>
+{
+<span class="bold"><strong>public</strong></span>:
+  <span class="emphasis"><em>// <a href="thread_group.html#thread_groupconstruct-copy-destruct">construct/copy/destruct</a></em></span>
+  <a href="thread_group.html#id657106-bb">thread_group</a>();
+  <a href="thread_group.html#id892819-bb">~thread_group</a>();
+
+  <span class="emphasis"><em>// <a href="thread_group.html#id859920-bb">modifier</a></em></span>
+  <span class="type"><a href="thread.html" title="Class thread">thread</a>*</span> <a href="thread_group.html#id1171912-bb">create_thread</a>(<span class="bold"><strong>const</strong></span> boost::function0&lt;<span class="bold"><strong>void</strong></span>&gt;&amp;);
+  <span class="type"><span class="bold"><strong>void</strong></span></span> <a href="thread_group.html#id1250288-bb">add_thread</a>(<a href="thread.html" title="Class thread">thread</a>* thrd);
+  <span class="type"><span class="bold"><strong>void</strong></span></span> <a href="thread_group.html#id824434-bb">remove_thread</a>(<a href="thread.html" title="Class thread">thread</a>* thrd);
+  <span class="type"><span class="bold"><strong>void</strong></span></span> <a href="thread_group.html#id799018-bb">join_all</a>();
+};</pre></div>
+<div class="refsect1" lang="en">
+<a name="id1564348"></a><h2>Description</h2>
+<div class="refsect2" lang="en">
+<a name="id1564351"></a><h3>
+<a name="thread_groupconstruct-copy-destruct"></a><code class="computeroutput">thread_group</code> construct/copy/destruct</h3>
+<div class="orderedlist"><ol type="1">
+<li>
+<pre class="literallayout"><a name="id657106-bb"></a>thread_group();</pre>
+<p><b xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"><span class="term">Effects</span></b>:
+
+ Constructs an empty <a href="thread_group.html" title="Class thread_group">thread_group</a>
+ container.</p>
+</li>
+<li>
+<pre class="literallayout"><a name="id892819-bb"></a>~thread_group();</pre>
+<p><b xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"><span class="term">Effects</span></b>:
+
+ Destroys each contained thread object. Destroys <code class="computeroutput">*this</code>.<br><b xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"><span class="term">Notes</span></b>:
+
+ Behavior is undefined if another thread references
+ <code class="computeroutput">*this </code> during the execution of the destructor.
+ </p>
+</li>
+</ol></div>
+</div>
+<div class="refsect2" lang="en">
+<a name="id1564443"></a><h3>
+<a name="id859920-bb"></a><code class="computeroutput">thread_group</code> modifier</h3>
+<div class="orderedlist"><ol type="1">
+<li>
+<pre class="literallayout"><span class="type"><a href="thread.html" title="Class thread">thread</a>*</span> <a name="id1171912-bb"></a>create_thread(<span class="bold"><strong>const</strong></span> boost::function0&lt;<span class="bold"><strong>void</strong></span>&gt;&amp; threadfunc);</pre>
+<p><b xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"><span class="term">Effects</span></b>:
+
+ Creates a new <a href="thread.html" title="Class thread">thread</a> object
+ that executes <code class="computeroutput">threadfunc</code> and adds it to the
+ <code class="computeroutput">thread_group</code> container object's list of managed
+ <a href="thread.html" title="Class thread">thread</a> objects.<br><b xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"><span class="term">Returns</span></b>:
+
+ Pointer to the newly created
+ <a href="thread.html" title="Class thread">thread</a> object.</p>
+</li>
+<li>
+<pre class="literallayout"><span class="type"><span class="bold"><strong>void</strong></span></span> <a name="id1250288-bb"></a>add_thread(<a href="thread.html" title="Class thread">thread</a>* thrd thrd);</pre>
+<p><b xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"><span class="term">Effects</span></b>:
+
+ Adds <code class="computeroutput">thrd</code> to the
+ <a href="thread_group.html" title="Class thread_group">thread_group</a> object's list of managed
+ <a href="thread.html" title="Class thread">thread</a> objects. The <code class="computeroutput">thrd</code>
+ object must have been allocated via <code class="computeroutput">operator new</code> and will
+ be deleted when the group is destroyed.</p>
+</li>
+<li>
+<pre class="literallayout"><span class="type"><span class="bold"><strong>void</strong></span></span> <a name="id824434-bb"></a>remove_thread(<a href="thread.html" title="Class thread">thread</a>* thrd thrd);</pre>
+<p><b xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"><span class="term">Effects</span></b>:
+
+ Removes <code class="computeroutput">thread</code> from <code class="computeroutput">*this</code>'s
+ list of managed <a href="thread.html" title="Class thread">thread</a> objects.<br><b xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"><span class="term">Throws</span></b>:
+
+ <span class="bold"><strong>???</strong></span> if
+ <code class="computeroutput">thrd</code> is not in <code class="computeroutput">*this</code>'s list
+ of managed <a href="thread.html" title="Class thread">thread</a> objects.</p>
+</li>
+<li>
+<pre class="literallayout"><span class="type"><span class="bold"><strong>void</strong></span></span> <a name="id799018-bb"></a>join_all();</pre>
+<p><b xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"><span class="term">Effects</span></b>:
+
+ Calls <code class="computeroutput">join()</code> on each of the managed
+ <a href="thread.html" title="Class thread">thread</a> objects.</p>
+</li>
+</ol></div>
+</div>
+</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"><small>Copyright © 2001-2003 William E. Kempf</small></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="thread.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="threads/reference.html#id1248802"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="thread_specific_ptr.html"><img src="images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>