• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<html>
3<head>
4<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5<title>Class dummy_mutex</title>
6<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
7<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
8<link rel="home" href="../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
9<link rel="up" href="../../signals2/reference.html#header.boost.signals2.dummy_mutex_hpp" title="Header &lt;boost/signals2/dummy_mutex.hpp&gt;">
10<link rel="prev" href="postconstructor_invoker.html" title="Class postconstructor_invoker">
11<link rel="next" href="last_value.html" title="Class template last_value">
12</head>
13<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
14<table cellpadding="2" width="100%"><tr>
15<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
16<td align="center"><a href="../../../../index.html">Home</a></td>
17<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
18<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
19<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
20<td align="center"><a href="../../../../more/index.htm">More</a></td>
21</tr></table>
22<hr>
23<div class="spirit-nav">
24<a accesskey="p" href="postconstructor_invoker.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../signals2/reference.html#header.boost.signals2.dummy_mutex_hpp"><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="last_value.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
25</div>
26<div class="refentry">
27<a name="boost.signals2.dummy_mutex"></a><div class="titlepage"></div>
28<div class="refnamediv">
29<h2><span class="refentrytitle">Class dummy_mutex</span></h2>
30<p>boost::signals2::dummy_mutex — Fake mutex which does nothing.</p>
31</div>
32<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
33<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../signals2/reference.html#header.boost.signals2.dummy_mutex_hpp" title="Header &lt;boost/signals2/dummy_mutex.hpp&gt;">boost/signals2/dummy_mutex.hpp</a>&gt;
34
35</span>
36<span class="keyword">class</span> <a class="link" href="dummy_mutex.html" title="Class dummy_mutex">dummy_mutex</a> <span class="special">:</span> <span class="keyword">public</span> noncopyable <span class="special">{</span>
37<span class="keyword">public</span><span class="special">:</span>
38  <span class="keyword">void</span> <a class="link" href="dummy_mutex.html#id-1_3_36_6_4_3_1_1_4_1-bb"><span class="identifier">lock</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
39  <span class="keyword">bool</span> <a class="link" href="dummy_mutex.html#id-1_3_36_6_4_3_1_1_4_2-bb"><span class="identifier">try_lock</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
40  <span class="keyword">void</span> <a class="link" href="dummy_mutex.html#id-1_3_36_6_4_3_1_1_4_3-bb"><span class="identifier">unlock</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
41<span class="special">}</span><span class="special">;</span></pre></div>
42<div class="refsect1">
43<a name="id-1.3.36.6.5.3.4"></a><h2>Description</h2>
44<p>You may wish to use the <code class="computeroutput">dummy_mutex</code> class for the <code class="computeroutput">Mutex</code>
45          template type of your signals if you are not concerned about thread safety.
46          This may give slightly faster
47          performance, since <code class="computeroutput">dummy_mutex</code> performs no actual locking.
48          </p>
49<pre class="literallayout"><span class="keyword">void</span> <a name="id-1_3_36_6_4_3_1_1_4_1-bb"></a><span class="identifier">lock</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
50<p>No effect.
51              </p>
52<pre class="literallayout"><span class="keyword">bool</span> <a name="id-1_3_36_6_4_3_1_1_4_2-bb"></a><span class="identifier">try_lock</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
53<p>No effect.
54              </p>
55<div class="variablelist"><table border="0" class="variablelist compact">
56<colgroup>
57<col align="left" valign="top">
58<col>
59</colgroup>
60<tbody><tr>
61<td><p><span class="term">Returns:</span></p></td>
62<td><p><code class="computeroutput">true</code>.</p></td>
63</tr></tbody>
64</table></div>
65<pre class="literallayout"><span class="keyword">void</span> <a name="id-1_3_36_6_4_3_1_1_4_3-bb"></a><span class="identifier">unlock</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
66<p>No effect.
67              </p>
68</div>
69</div>
70<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
71<td align="left"></td>
72<td align="right"><div class="copyright-footer">Copyright © 2001-2004 Douglas Gregor<br>Copyright © 2007-2009 Frank Mori Hess<p>Distributed under the Boost
73    Software License, Version 1.0. (See accompanying file
74    <code class="filename">LICENSE_1_0.txt</code> 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>
75</div></td>
76</tr></table>
77<hr>
78<div class="spirit-nav">
79<a accesskey="p" href="postconstructor_invoker.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../signals2/reference.html#header.boost.signals2.dummy_mutex_hpp"><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="last_value.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
80</div>
81</body>
82</html>
83