Imported Upstream version 1.64.0
[platform/upstream/boost.git] / libs / fiber / doc / html / fiber / synchronization.html
1 <html>
2 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>Synchronization</title>
5 <link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
6 <meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7 <link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Fiber">
8 <link rel="up" href="../index.html" title="Chapter&#160;1.&#160;Fiber">
9 <link rel="prev" href="stack/valgrind.html" title="Support for valgrind">
10 <link rel="next" href="synchronization/mutex_types.html" title="Mutex Types">
11 </head>
12 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13 <table cellpadding="2" width="100%"><tr>
14 <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
15 <td align="center"><a href="../../../../../index.html">Home</a></td>
16 <td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
17 <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18 <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19 <td align="center"><a href="../../../../../more/index.htm">More</a></td>
20 </tr></table>
21 <hr>
22 <div class="spirit-nav">
23 <a accesskey="p" href="stack/valgrind.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.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="synchronization/mutex_types.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
24 </div>
25 <div class="section">
26 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
27 <a name="fiber.synchronization"></a><a name="synchronization"></a><a class="link" href="synchronization.html" title="Synchronization">Synchronization</a>
28 </h2></div></div></div>
29 <div class="toc"><dl class="toc">
30 <dt><span class="section"><a href="synchronization/mutex_types.html">Mutex Types</a></span></dt>
31 <dt><span class="section"><a href="synchronization/conditions.html">Condition Variables</a></span></dt>
32 <dt><span class="section"><a href="synchronization/barriers.html">Barriers</a></span></dt>
33 <dt><span class="section"><a href="synchronization/channels.html">Channels</a></span></dt>
34 <dd><dl>
35 <dt><span class="section"><a href="synchronization/channels/buffered_channel.html">Buffered
36         Channel</a></span></dt>
37 <dt><span class="section"><a href="synchronization/channels/unbuffered_channel.html">Unbuffered
38         Channel</a></span></dt>
39 </dl></dd>
40 <dt><span class="section"><a href="synchronization/futures.html">Futures</a></span></dt>
41 <dd><dl>
42 <dt><span class="section"><a href="synchronization/futures/future.html">Future</a></span></dt>
43 <dt><span class="section"><a href="synchronization/futures/promise.html">Template
44         <code class="computeroutput"><span class="identifier">promise</span><span class="special">&lt;&gt;</span></code></a></span></dt>
45 <dt><span class="section"><a href="synchronization/futures/packaged_task.html">Template
46         <code class="computeroutput"><span class="identifier">packaged_task</span><span class="special">&lt;&gt;</span></code></a></span></dt>
47 </dl></dd>
48 </dl></div>
49 <p>
50       In general, <span class="bold"><strong>Boost.Fiber</strong></span> synchronization objects
51       can neither be moved nor copied. A synchronization object acts as a mutually-agreed
52       rendezvous point between different fibers. If such an object were copied somewhere
53       else, the new copy would have no consumers. If such an object were <span class="emphasis"><em>moved</em></span>
54       somewhere else, leaving the original instance in an unspecified state, existing
55       consumers would behave strangely.
56     </p>
57 <p>
58       The fiber synchronization objects provided by this library will, by default,
59       safely synchronize fibers running on different threads. However, this level
60       of synchronization can be removed (for performance) by building the library
61       with <span class="bold"><strong><code class="computeroutput"><span class="identifier">BOOST_FIBERS_NO_ATOMICS</span></code></strong></span>
62       defined. When the library is built with that macro, you must ensure that all
63       the fibers referencing a particular synchronization object are running in the
64       same thread.
65     </p>
66 </div>
67 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
68 <td align="left"></td>
69 <td align="right"><div class="copyright-footer">Copyright &#169; 2013 Oliver Kowalke<p>
70         Distributed under the Boost Software License, Version 1.0. (See accompanying
71         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>)
72       </p>
73 </div></td>
74 </tr></table>
75 <hr>
76 <div class="spirit-nav">
77 <a accesskey="p" href="stack/valgrind.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.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="synchronization/mutex_types.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
78 </div>
79 </body>
80 </html>