Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r56765 - in sandbox/synchro: . doc doc/html doc/html/images doc/html/images/callouts libs/synchro/doc/html libs/synchro/doc/html/boost_synchro libs/synchro/doc/html/boost_synchro/appendices libs/synchro/doc/html/boost_synchro/overview libs/synchro/doc/html/boost_synchro/reference libs/synchro/doc/html/boost_synchro/users_guide libs/synchro/test
From: vicente.botet_at_[hidden]
Date: 2009-10-12 17:49:39


Author: viboes
Date: 2009-10-12 17:49:35 EDT (Mon, 12 Oct 2009)
New Revision: 56765
URL: http://svn.boost.org/trac/boost/changeset/56765

Log:
TBoost.Synchro:
* Added doc

Added:
   sandbox/synchro/boost.png (contents, props changed)
   sandbox/synchro/doc/
   sandbox/synchro/doc/html/
   sandbox/synchro/doc/html/boostbook.css (contents, props changed)
   sandbox/synchro/doc/html/images/
   sandbox/synchro/doc/html/images/alert.png (contents, props changed)
   sandbox/synchro/doc/html/images/blank.png (contents, props changed)
   sandbox/synchro/doc/html/images/callouts/
   sandbox/synchro/doc/html/images/callouts/1.png (contents, props changed)
   sandbox/synchro/doc/html/images/callouts/10.png (contents, props changed)
   sandbox/synchro/doc/html/images/callouts/11.png (contents, props changed)
   sandbox/synchro/doc/html/images/callouts/12.png (contents, props changed)
   sandbox/synchro/doc/html/images/callouts/13.png (contents, props changed)
   sandbox/synchro/doc/html/images/callouts/14.png (contents, props changed)
   sandbox/synchro/doc/html/images/callouts/15.png (contents, props changed)
   sandbox/synchro/doc/html/images/callouts/2.png (contents, props changed)
   sandbox/synchro/doc/html/images/callouts/3.png (contents, props changed)
   sandbox/synchro/doc/html/images/callouts/4.png (contents, props changed)
   sandbox/synchro/doc/html/images/callouts/5.png (contents, props changed)
   sandbox/synchro/doc/html/images/callouts/6.png (contents, props changed)
   sandbox/synchro/doc/html/images/callouts/7.png (contents, props changed)
   sandbox/synchro/doc/html/images/callouts/8.png (contents, props changed)
   sandbox/synchro/doc/html/images/callouts/9.png (contents, props changed)
   sandbox/synchro/doc/html/images/caution.png (contents, props changed)
   sandbox/synchro/doc/html/images/draft.png (contents, props changed)
   sandbox/synchro/doc/html/images/home.png (contents, props changed)
   sandbox/synchro/doc/html/images/important.png (contents, props changed)
   sandbox/synchro/doc/html/images/next.png (contents, props changed)
   sandbox/synchro/doc/html/images/next_disabled.png (contents, props changed)
   sandbox/synchro/doc/html/images/note.png (contents, props changed)
   sandbox/synchro/doc/html/images/prev.png (contents, props changed)
   sandbox/synchro/doc/html/images/prev_disabled.png (contents, props changed)
   sandbox/synchro/doc/html/images/smiley.png (contents, props changed)
   sandbox/synchro/doc/html/images/tip.png (contents, props changed)
   sandbox/synchro/doc/html/images/toc-blank.png (contents, props changed)
   sandbox/synchro/doc/html/images/toc-minus.png (contents, props changed)
   sandbox/synchro/doc/html/images/toc-plus.png (contents, props changed)
   sandbox/synchro/doc/html/images/up.png (contents, props changed)
   sandbox/synchro/doc/html/images/up_disabled.png (contents, props changed)
   sandbox/synchro/doc/html/images/warning.png (contents, props changed)
   sandbox/synchro/doc/html/reference.css (contents, props changed)
   sandbox/synchro/libs/synchro/doc/html/
   sandbox/synchro/libs/synchro/doc/html/boost_synchro/
   sandbox/synchro/libs/synchro/doc/html/boost_synchro/appendices/
   sandbox/synchro/libs/synchro/doc/html/boost_synchro/appendices.html (contents, props changed)
   sandbox/synchro/libs/synchro/doc/html/boost_synchro/appendices/acknowledgements.html (contents, props changed)
   sandbox/synchro/libs/synchro/doc/html/boost_synchro/appendices/appendix_e__tests.html (contents, props changed)
   sandbox/synchro/libs/synchro/doc/html/boost_synchro/appendices/appendix_f__tickets.html (contents, props changed)
   sandbox/synchro/libs/synchro/doc/html/boost_synchro/appendices/history.html (contents, props changed)
   sandbox/synchro/libs/synchro/doc/html/boost_synchro/appendices/implementation.html (contents, props changed)
   sandbox/synchro/libs/synchro/doc/html/boost_synchro/appendices/rationale.html (contents, props changed)
   sandbox/synchro/libs/synchro/doc/html/boost_synchro/appendices/todo.html (contents, props changed)
   sandbox/synchro/libs/synchro/doc/html/boost_synchro/examples.html (contents, props changed)
   sandbox/synchro/libs/synchro/doc/html/boost_synchro/overview/
   sandbox/synchro/libs/synchro/doc/html/boost_synchro/overview.html (contents, props changed)
   sandbox/synchro/libs/synchro/doc/html/boost_synchro/overview/intro.html (contents, props changed)
   sandbox/synchro/libs/synchro/doc/html/boost_synchro/reference/
   sandbox/synchro/libs/synchro/doc/html/boost_synchro/reference.html (contents, props changed)
   sandbox/synchro/libs/synchro/doc/html/boost_synchro/reference/condition_lockables.html (contents, props changed)
   sandbox/synchro/libs/synchro/doc/html/boost_synchro/reference/generic_free_functions_on_lockable.html (contents, props changed)
   sandbox/synchro/libs/synchro/doc/html/boost_synchro/reference/generic_free_functions_on_multiple_lockables.html (contents, props changed)
   sandbox/synchro/libs/synchro/doc/html/boost_synchro/reference/high_level.html (contents, props changed)
   sandbox/synchro/libs/synchro/doc/html/boost_synchro/reference/lockables.html (contents, props changed)
   sandbox/synchro/libs/synchro/doc/html/boost_synchro/reference/lockers.html (contents, props changed)
   sandbox/synchro/libs/synchro/doc/html/boost_synchro/reference/multi_process.html (contents, props changed)
   sandbox/synchro/libs/synchro/doc/html/boost_synchro/reference/multi_threaded.html (contents, props changed)
   sandbox/synchro/libs/synchro/doc/html/boost_synchro/reference/other.html (contents, props changed)
   sandbox/synchro/libs/synchro/doc/html/boost_synchro/reference/polymorphic_locks.html (contents, props changed)
   sandbox/synchro/libs/synchro/doc/html/boost_synchro/reference/single_threaded.html (contents, props changed)
   sandbox/synchro/libs/synchro/doc/html/boost_synchro/users_guide/
   sandbox/synchro/libs/synchro/doc/html/boost_synchro/users_guide.html (contents, props changed)
   sandbox/synchro/libs/synchro/doc/html/boost_synchro/users_guide/ext_references.html (contents, props changed)
   sandbox/synchro/libs/synchro/doc/html/boost_synchro/users_guide/getting_started.html (contents, props changed)
   sandbox/synchro/libs/synchro/doc/html/boost_synchro/users_guide/glosary.html (contents, props changed)
   sandbox/synchro/libs/synchro/doc/html/boost_synchro/users_guide/tutorial.html (contents, props changed)
   sandbox/synchro/libs/synchro/doc/html/index.html (contents, props changed)
   sandbox/synchro/libs/synchro/doc/html/standalone_HTML.manifest (contents, props changed)
Text files modified:
   sandbox/synchro/libs/synchro/test/Jamfile.v2 | 6 +++---
   1 files changed, 3 insertions(+), 3 deletions(-)

Added: sandbox/synchro/boost.png
==============================================================================
Binary file. No diff available.

Added: sandbox/synchro/doc/html/boostbook.css
==============================================================================
--- (empty file)
+++ sandbox/synchro/doc/html/boostbook.css 2009-10-12 17:49:35 EDT (Mon, 12 Oct 2009)
@@ -0,0 +1,538 @@
+/*=============================================================================
+ Copyright (c) 2004 Joel de Guzman
+ http://spirit.sourceforge.net/
+
+ Use, modification and distribution is subject to the Boost Software
+ License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+=============================================================================*/
+
+/*=============================================================================
+ Body defaults
+=============================================================================*/
+
+ body
+ {
+ margin: 1em;
+ font-family: sans-serif;
+ }
+
+/*=============================================================================
+ Paragraphs
+=============================================================================*/
+
+ p
+ {
+ text-align: left;
+ font-size: 10pt;
+ line-height: 1.15;
+ }
+
+/*=============================================================================
+ Program listings
+=============================================================================*/
+
+ /* Code on paragraphs */
+ p tt.computeroutput
+ {
+ font-size: 10pt;
+ }
+
+ pre.synopsis
+ {
+ font-size: 10pt;
+ margin: 1pc 4% 0pc 4%;
+ padding: 0.5pc 0.5pc 0.5pc 0.5pc;
+ }
+
+ .programlisting,
+ .screen
+ {
+ font-size: 10pt;
+ display: block;
+ margin: 1pc 4% 0pc 4%;
+ padding: 0.5pc 0.5pc 0.5pc 0.5pc;
+ }
+
+/*=============================================================================
+ Headings
+=============================================================================*/
+
+ h1, h2, h3, h4, h5, h6
+ {
+ text-align: left;
+ margin: 1em 0em 0.5em 0em;
+ font-weight: bold;
+ }
+
+ h1 { font: 140% }
+ h2 { font: bold 140% }
+ h3 { font: bold 130% }
+ h4 { font: bold 120% }
+ h5 { font: italic 110% }
+ h6 { font: italic 100% }
+
+ /* Top page titles */
+ title,
+ h1.title,
+ h2.title
+ h3.title,
+ h4.title,
+ h5.title,
+ h6.title,
+ .refentrytitle
+ {
+ font-weight: bold;
+ margin-bottom: 1pc;
+ }
+
+ h1.title { font-size: 140% }
+ h2.title { font-size: 140% }
+ h3.title { font-size: 130% }
+ h4.title { font-size: 120% }
+ h5.title { font-size: 110% }
+ h6.title { font-size: 100% }
+
+ .section h1
+ {
+ margin: 0em 0em 0.5em 0em;
+ font-size: 140%;
+ }
+
+ .section h2 { font-size: 140% }
+ .section h3 { font-size: 130% }
+ .section h4 { font-size: 120% }
+ .section h5 { font-size: 110% }
+ .section h6 { font-size: 100% }
+
+ /* Code on titles */
+ h1 tt.computeroutput { font-size: 140% }
+ h2 tt.computeroutput { font-size: 140% }
+ h3 tt.computeroutput { font-size: 130% }
+ h4 tt.computeroutput { font-size: 120% }
+ h5 tt.computeroutput { font-size: 110% }
+ h6 tt.computeroutput { font-size: 100% }
+
+/*=============================================================================
+ Author
+=============================================================================*/
+
+ h3.author
+ {
+ font-size: 100%
+ }
+
+/*=============================================================================
+ Lists
+=============================================================================*/
+
+ li
+ {
+ font-size: 10pt;
+ line-height: 1.3;
+ }
+
+ /* Unordered lists */
+ ul
+ {
+ text-align: left;
+ }
+
+ /* Ordered lists */
+ ol
+ {
+ text-align: left;
+ }
+
+/*=============================================================================
+ Links
+=============================================================================*/
+
+ a
+ {
+ text-decoration: none; /* no underline */
+ }
+
+ a:hover
+ {
+ text-decoration: underline;
+ }
+
+/*=============================================================================
+ Spirit style navigation
+=============================================================================*/
+
+ .spirit-nav
+ {
+ text-align: right;
+ }
+
+ .spirit-nav a
+ {
+ color: white;
+ padding-left: 0.5em;
+ }
+
+ .spirit-nav img
+ {
+ border-width: 0px;
+ }
+
+/*=============================================================================
+ Table of contents
+=============================================================================*/
+
+ .toc
+ {
+ margin: 1pc 4% 0pc 4%;
+ padding: 0.1pc 1pc 0.1pc 1pc;
+ font-size: 10pt;
+ line-height: 1.15;
+ }
+
+ .toc-main
+ {
+ width: 600;
+ text-align: center;
+ margin: 1pc 1pc 1pc 10%;
+ padding: 2pc 1pc 3pc 1pc;
+ line-height: 0.1;
+ }
+
+ .boost-toc
+ {
+ float: right;
+ padding: 0.5pc;
+ }
+
+/*=============================================================================
+ Tables
+=============================================================================*/
+
+ .table-title,
+ div.table p.title
+ {
+ margin-left: 4%;
+ padding-right: 0.5em;
+ padding-left: 0.5em;
+ }
+
+ .informaltable table,
+ .table table
+ {
+ width: 92%;
+ margin-left: 4%;
+ margin-right: 4%;
+ }
+
+ div.informaltable table,
+ div.table table
+ {
+ padding: 4px;
+ }
+
+ /* Table Cells */
+ div.informaltable table tr td,
+ div.table table tr td
+ {
+ padding: 0.5em;
+ text-align: left;
+ }
+
+ div.informaltable table tr th,
+ div.table table tr th
+ {
+ padding: 0.5em 0.5em 0.5em 0.5em;
+ border: 1pt solid white;
+ font-size: 120%;
+ }
+
+/*=============================================================================
+ Blurbs
+=============================================================================*/
+
+ div.note,
+ div.tip,
+ div.important,
+ div.caution,
+ div.warning,
+ p.blurb
+ {
+ font-size: 10pt;
+ line-height: 1.2;
+ display: block;
+ margin: 1pc 4% 0pc 4%;
+ padding: 0.5pc 0.5pc 0.5pc 0.5pc;
+ }
+
+ p.blurb img
+ {
+ padding: 1pt;
+ }
+
+/*=============================================================================
+ Variable Lists
+=============================================================================*/
+
+ span.term
+ {
+ font-weight: bold;
+ font-size: 10pt;
+ }
+
+ div.variablelist table tbody tr td
+ {
+ text-align: left;
+ vertical-align: top;
+ padding: 0em 2em 0em 0em;
+ font-size: 10pt;
+ }
+
+ div.variablelist table tbody tr td p
+ {
+ margin: 0em 0em 0.5em 0em;
+ }
+
+ /* Make the terms in definition lists bold */
+ div.variablelist dl dt
+ {
+ font-weight: bold;
+ font-size: 10pt;
+ }
+
+ div.variablelist dl dd
+ {
+ margin: 1em 0em 1em 2em;
+ font-size: 10pt;
+ }
+
+/*=============================================================================
+ Misc
+=============================================================================*/
+
+ /* Title of books and articles in bibliographies */
+ span.title
+ {
+ font-style: italic;
+ }
+
+ span.underline
+ {
+ text-decoration: underline;
+ }
+
+ span.strikethrough
+ {
+ text-decoration: line-through;
+ }
+
+ /* Copyright, Legal Notice */
+ div div.legalnotice p
+ {
+ font-size: 8pt;
+ text-align: left
+ }
+
+/*=============================================================================
+ Colors
+=============================================================================*/
+
+ @media screen
+ {
+ /* Links */
+ a
+ {
+ color: #0C7445;
+ }
+
+ a:visited
+ {
+ color: #663974;
+ }
+
+ h1 a, h2 a, h3 a, h4 a, h5 a, h6 a,
+ h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover,
+ h1 a:visited, h2 a:visited, h3 a:visited, h4 a:visited, h5 a:visited, h6 a:visited
+ {
+ text-decoration: none; /* no underline */
+ color: #000000;
+ }
+
+ /* Syntax Highlighting */
+ .keyword { color: #0000AA; }
+ .identifier { color: #000000; }
+ .special { color: #707070; }
+ .preprocessor { color: #402080; }
+ .char { color: teal; }
+ .comment { color: #800000; }
+ .string { color: teal; }
+ .number { color: teal; }
+ .white_bkd { background-color: #E8FBE9; }
+ .dk_grey_bkd { background-color: #A0DAAC; }
+
+ /* Copyright, Legal Notice */
+ .copyright
+ {
+ color: #666666;
+ font-size: small;
+ }
+
+ div div.legalnotice p
+ {
+ color: #666666;
+ }
+
+ /* Program listing */
+ pre.synopsis
+ {
+ border: 1px solid #DCDCDC;
+ border-bottom: 3px solid #9D9D9D;
+ border-right: 3px solid #9D9D9D;
+ background-color: #FAFFFB;
+ }
+
+ .programlisting,
+ .screen
+ {
+ border: 1px solid #DCDCDC;
+ border-bottom: 3px solid #9D9D9D;
+ border-right: 3px solid #9D9D9D;
+ background-color: #FAFFFB;
+ }
+
+ /* Blurbs */
+ div.note,
+ div.tip,
+ div.important,
+ div.caution,
+ div.warning,
+ p.blurb
+ {
+ border: 1px solid #DCDCDC;
+ border-bottom: 3px solid #9D9D9D;
+ border-right: 3px solid #9D9D9D;
+ background-color: #FAFFFB;
+ }
+
+ /* Table of contents */
+ .toc
+ {
+ border: 1px solid #DCDCDC;
+ border-bottom: 3px solid #9D9D9D;
+ border-right: 3px solid #9D9D9D;
+ background-color: #FAFFFB;
+ }
+
+ /* Table of contents */
+ .toc-main
+ {
+ border: 1px solid #DCDCDC;
+ border-bottom: 3px solid #9D9D9D;
+ border-right: 3px solid #9D9D9D;
+ background-color: #FAFFFB;
+ }
+
+
+ /* Tables */
+ div.informaltable table tr td,
+ div.table table tr td
+ {
+ border: 1px solid #DCDCDC;
+ background-color: #FAFFFB;
+ }
+
+ div.informaltable table tr th,
+ div.table table tr th
+ {
+ background-color: #E3F9E4;
+ border: 1px solid #DCDCDC;
+ }
+
+ /* Misc */
+ span.highlight
+ {
+ color: #00A000;
+ }
+ }
+
+ @media print
+ {
+ /* Links */
+ a
+ {
+ color: black;
+ }
+
+ a:visited
+ {
+ color: black;
+ }
+
+ .spirit-nav
+ {
+ display: none;
+ }
+
+ /* Program listing */
+ pre.synopsis
+ {
+ border: 1px solid gray;
+ background-color: #FAFFFB;
+ }
+
+ .programlisting,
+ .screen
+ {
+ border: 1px solid gray;
+ background-color: #FAFFFB;
+ }
+
+ /* Table of contents */
+ .toc
+ {
+ border: 1px solid #DCDCDC;
+ border-bottom: 3px solid #9D9D9D;
+ border-right: 3px solid #9D9D9D;
+ background-color: #FAFFFB;
+ }
+
+ /* Table of contents */
+ .toc-main
+ {
+ border: 1px solid #DCDCDC;
+ border-bottom: 3px solid #9D9D9D;
+ border-right: 3px solid #9D9D9D;
+ background-color: #FAFFFB;
+ }
+
+ .informaltable table,
+ .table table
+ {
+ border: 1px solid #DCDCDC;
+ border-bottom: 3px solid #9D9D9D;
+ border-right: 3px solid #9D9D9D;
+ border-collapse: collapse;
+ background-color: #FAFFFB;
+ }
+
+ /* Tables */
+ div.informaltable table tr td,
+ div.table table tr td
+ {
+ border: 1px solid #DCDCDC;
+ background-color: #FAFFFB;
+ }
+
+ div.informaltable table tr th,
+ div.table table tr th
+ {
+ border: 1px solid #DCDCDC;
+ background-color: #FAFFFB;
+ }
+
+ /* Misc */
+ span.highlight
+ {
+ font-weight: bold;
+ }
+ }

Added: sandbox/synchro/doc/html/images/alert.png
==============================================================================
Binary file. No diff available.

Added: sandbox/synchro/doc/html/images/blank.png
==============================================================================
Binary file. No diff available.

Added: sandbox/synchro/doc/html/images/callouts/1.png
==============================================================================
Binary file. No diff available.

Added: sandbox/synchro/doc/html/images/callouts/10.png
==============================================================================
Binary file. No diff available.

Added: sandbox/synchro/doc/html/images/callouts/11.png
==============================================================================
Binary file. No diff available.

Added: sandbox/synchro/doc/html/images/callouts/12.png
==============================================================================
Binary file. No diff available.

Added: sandbox/synchro/doc/html/images/callouts/13.png
==============================================================================
Binary file. No diff available.

Added: sandbox/synchro/doc/html/images/callouts/14.png
==============================================================================
Binary file. No diff available.

Added: sandbox/synchro/doc/html/images/callouts/15.png
==============================================================================
Binary file. No diff available.

Added: sandbox/synchro/doc/html/images/callouts/2.png
==============================================================================
Binary file. No diff available.

Added: sandbox/synchro/doc/html/images/callouts/3.png
==============================================================================
Binary file. No diff available.

Added: sandbox/synchro/doc/html/images/callouts/4.png
==============================================================================
Binary file. No diff available.

Added: sandbox/synchro/doc/html/images/callouts/5.png
==============================================================================
Binary file. No diff available.

Added: sandbox/synchro/doc/html/images/callouts/6.png
==============================================================================
Binary file. No diff available.

Added: sandbox/synchro/doc/html/images/callouts/7.png
==============================================================================
Binary file. No diff available.

Added: sandbox/synchro/doc/html/images/callouts/8.png
==============================================================================
Binary file. No diff available.

Added: sandbox/synchro/doc/html/images/callouts/9.png
==============================================================================
Binary file. No diff available.

Added: sandbox/synchro/doc/html/images/caution.png
==============================================================================
Binary file. No diff available.

Added: sandbox/synchro/doc/html/images/draft.png
==============================================================================
Binary file. No diff available.

Added: sandbox/synchro/doc/html/images/home.png
==============================================================================
Binary file. No diff available.

Added: sandbox/synchro/doc/html/images/important.png
==============================================================================
Binary file. No diff available.

Added: sandbox/synchro/doc/html/images/next.png
==============================================================================
Binary file. No diff available.

Added: sandbox/synchro/doc/html/images/next_disabled.png
==============================================================================
Binary file. No diff available.

Added: sandbox/synchro/doc/html/images/note.png
==============================================================================
Binary file. No diff available.

Added: sandbox/synchro/doc/html/images/prev.png
==============================================================================
Binary file. No diff available.

Added: sandbox/synchro/doc/html/images/prev_disabled.png
==============================================================================
Binary file. No diff available.

Added: sandbox/synchro/doc/html/images/smiley.png
==============================================================================
Binary file. No diff available.

Added: sandbox/synchro/doc/html/images/tip.png
==============================================================================
Binary file. No diff available.

Added: sandbox/synchro/doc/html/images/toc-blank.png
==============================================================================
Binary file. No diff available.

Added: sandbox/synchro/doc/html/images/toc-minus.png
==============================================================================
Binary file. No diff available.

Added: sandbox/synchro/doc/html/images/toc-plus.png
==============================================================================
Binary file. No diff available.

Added: sandbox/synchro/doc/html/images/up.png
==============================================================================
Binary file. No diff available.

Added: sandbox/synchro/doc/html/images/up_disabled.png
==============================================================================
Binary file. No diff available.

Added: sandbox/synchro/doc/html/images/warning.png
==============================================================================
Binary file. No diff available.

Added: sandbox/synchro/doc/html/reference.css
==============================================================================
--- (empty file)
+++ sandbox/synchro/doc/html/reference.css 2009-10-12 17:49:35 EDT (Mon, 12 Oct 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2004 Joel de Guzman
+ http://spirit.sourceforge.net/
+
+ Use, modification and distribution is subject to the Boost Software
+ License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+=============================================================================*/
+PRE.synopsis {
+ background-color: #e0ffff;
+ border: thin solid blue;
+ padding: 1em
+}

Added: sandbox/synchro/libs/synchro/doc/html/boost_synchro/appendices.html
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/html/boost_synchro/appendices.html 2009-10-12 17:49:35 EDT (Mon, 12 Oct 2009)
@@ -0,0 +1,76 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Appendices</title>
+<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+<link rel="start" href="../index.html" title="Chapter 1. Boost.Synchro">
+<link rel="up" href="../index.html" title="Chapter 1. Boost.Synchro">
+<link rel="prev" href="examples.html" title="Examples">
+<link rel="next" href="appendices/history.html" title=" Appendix A: History">
+</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">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="examples.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="appendices/history.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="boost_synchro.appendices"></a>Appendices
+</h2></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"> Appendix A: History</span></dt>
+<dd><dl>
+<dt><span class="section"><a href="appendices/history.html#boost_synchro.appendices.history.__version_0_3_3__may_24__2009____extraction_of_boost_rendez_vous_"><span class="bold"><strong>Version 0.3.3, May 24, 2009</strong></span> <span class="emphasis"><em>Extraction of
+ Boost.Rendez-Vous</em></span></a></span></dt>
+<dt><span class="section"><a href="appendices/history.html#boost_synchro.appendices.history.__version_0_3_2__may_08__2009____adaptation_boost_1_39___extraction_of_boost_conversion_"><span class="bold"><strong>Version 0.3.2, May 08, 2009</strong></span> <span class="emphasis"><em>Adaptation Boost
+ 1.39 + Extraction of Boost.Conversion</em></span></a></span></dt>
+<dt><span class="section"><a href="appendices/history.html#boost_synchro.appendices.history.__version_0_3_1__mars_29__2009____language_like_synchronized_block_macros_"><span class="bold"><strong>Version 0.3.1, Mars 29, 2009</strong></span> <span class="emphasis"><em>Language-like
+ Synchronized Block Macros</em></span></a></span></dt>
+<dt><span class="section"><a href="appendices/history.html#boost_synchro.appendices.history.__version_0_3_0__mars_19__2009____generic_free_operations_on_multiple_lockables___usage_of_boost_chrono_"><span class="bold"><strong>Version 0.3.0, Mars 19, 2009</strong></span> <span class="emphasis"><em>Generic free
+ operations on multiple lockables + Usage of Boost.Chrono</em></span></a></span></dt>
+<dt><span class="section"><a href="appendices/history.html#boost_synchro.appendices.history.__version_0_2_0__mars_1__2009____binary_semaphore___array_locker_"><span class="bold"><strong>Version 0.2.0, Mars 1, 2009</strong></span> <span class="emphasis"><em>binary_semaphore
+ + array_locker</em></span></a></span></dt>
+<dt><span class="section"><a href="appendices/history.html#boost_synchro.appendices.history.__version_0_1_0__febraury_16__2009____announcement_of_synchro_"><span class="bold"><strong>Version 0.1.0, Febraury 16, 2009</strong></span> <span class="emphasis"><em>Announcement
+ of Synchro</em></span></a></span></dt>
+</dl></dd>
+<dt><span class="section"> Appendix B: Rationale</span></dt>
+<dt><span class="section"><a href="appendices/implementation.html"> Appendix C:
+ Implementation Notes</a></span></dt>
+<dt><span class="section"><a href="appendices/acknowledgements.html"> Appendix
+ D: Acknowledgements</a></span></dt>
+<dt><span class="section"><a href="appendices/appendix_e__tests.html">Appendix
+ E: Tests</a></span></dt>
+<dd><dl>
+<dt><span class="section">Lockables</span></dt>
+<dt><span class="section">Lockers</span></dt>
+<dt><span class="section">Others</span></dt>
+<dt><span class="section">Examples</span></dt>
+</dl></dd>
+<dt><span class="section"><a href="appendices/appendix_f__tickets.html">Appendix
+ F: Tickets</a></span></dt>
+<dt><span class="section"> Appendix E: Future plans</span></dt>
+</dl></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">Copyright © 2008 Vicente J. Botet Escriba<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="examples.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="appendices/history.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/synchro/libs/synchro/doc/html/boost_synchro/appendices/acknowledgements.html
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/html/boost_synchro/appendices/acknowledgements.html 2009-10-12 17:49:35 EDT (Mon, 12 Oct 2009)
@@ -0,0 +1,51 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title> Appendix
+ D: Acknowledgements</title>
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+<link rel="start" href="../../index.html" title="Chapter 1. Boost.Synchro">
+<link rel="up" href="../appendices.html" title="Appendices">
+<link rel="prev" href="implementation.html" title=" Appendix C:
+ Implementation Notes">
+<link rel="next" href="appendix_e__tests.html" title="Appendix
+ E: Tests">
+</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">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="implementation.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../appendices.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="appendix_e__tests.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_synchro.appendices.acknowledgements"></a><a href="acknowledgements.html" title=" Appendix
+ D: Acknowledgements"> Appendix
+ D: Acknowledgements</a>
+</h3></div></div></div>
+<p>
+ TBC
+ </p>
+</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">Copyright © 2008 Vicente J. Botet Escriba<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="implementation.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../appendices.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="appendix_e__tests.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/synchro/libs/synchro/doc/html/boost_synchro/appendices/appendix_e__tests.html
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/html/boost_synchro/appendices/appendix_e__tests.html 2009-10-12 17:49:35 EDT (Mon, 12 Oct 2009)
@@ -0,0 +1,550 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Appendix
+ E: Tests</title>
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+<link rel="start" href="../../index.html" title="Chapter 1. Boost.Synchro">
+<link rel="up" href="../appendices.html" title="Appendices">
+<link rel="prev" href="acknowledgements.html" title=" Appendix
+ D: Acknowledgements">
+<link rel="next" href="appendix_f__tickets.html" title="Appendix
+ F: Tickets">
+</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">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="acknowledgements.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../appendices.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="appendix_f__tickets.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_synchro.appendices.appendix_e__tests"></a><a href="appendix_e__tests.html" title="Appendix
+ E: Tests">Appendix
+ E: Tests</a>
+</h3></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section">Lockables</span></dt>
+<dt><span class="section">Lockers</span></dt>
+<dt><span class="section">Others</span></dt>
+<dt><span class="section">Examples</span></dt>
+</dl></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.appendices.appendix_e__tests.lockables"></a>Lockables
+</h4></div></div></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ kind
+ </p>
+ </th>
+<th>
+ <p>
+ Description
+ </p>
+ </th>
+<th>
+ <p>
+ Result
+ </p>
+ </th>
+<th>
+ <p>
+ Ticket
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ lockable_traits
+ </p>
+ </td>
+<td>
+ <p>
+ compile
+ </p>
+ </td>
+<td>
+ <p>
+ static assertion on lockables traits
+ </p>
+ </td>
+<td>
+ <p>
+ Pass
+ </p>
+ </td>
+<td>
+ <p>
+ #
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ lockable_concepts
+ </p>
+ </td>
+<td>
+ <p>
+ compile
+ </p>
+ </td>
+<td>
+ <p>
+ static assertion on lockables concepts
+ </p>
+ </td>
+<td>
+ <p>
+ Pass
+ </p>
+ </td>
+<td>
+ <p>
+ #
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.appendices.appendix_e__tests.lockers"></a>Lockers
+</h4></div></div></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ kind
+ </p>
+ </th>
+<th>
+ <p>
+ Description
+ </p>
+ </th>
+<th>
+ <p>
+ Result
+ </p>
+ </th>
+<th>
+ <p>
+ Ticket
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ locker_concepts
+ </p>
+ </td>
+<td>
+ <p>
+ compile
+ </p>
+ </td>
+<td>
+ <p>
+ static assertion on lockers concepts
+ </p>
+ </td>
+<td>
+ <p>
+ Pass
+ </p>
+ </td>
+<td>
+ <p>
+ #
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ nested_reverse_locker
+ </p>
+ </td>
+<td>
+ <p>
+ run
+ </p>
+ </td>
+<td>
+ <p>
+ nested_reverse_locker tests
+ </p>
+ </td>
+<td>
+ <p>
+ Pass
+ </p>
+ </td>
+<td>
+ <p>
+ #
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.appendices.appendix_e__tests.others"></a>Others
+</h4></div></div></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ kind
+ </p>
+ </th>
+<th>
+ <p>
+ Description
+ </p>
+ </th>
+<th>
+ <p>
+ Result
+ </p>
+ </th>
+<th>
+ <p>
+ Ticket
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ sync_buffer_family
+ </p>
+ </td>
+<td>
+ <p>
+ run
+ </p>
+ </td>
+<td>
+ <p>
+ synchronous buffer with synchronization family tests
+ </p>
+ </td>
+<td>
+ <p>
+ Pass
+ </p>
+ </td>
+<td>
+ <p>
+ #
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ sync_buffer_monitor
+ </p>
+ </td>
+<td>
+ <p>
+ run
+ </p>
+ </td>
+<td>
+ <p>
+ monitor synchronous buffer tests
+ </p>
+ </td>
+<td>
+ <p>
+ Fail
+ </p>
+ </td>
+<td>
+ <p>
+ v0.2#1
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.appendices.appendix_e__tests.examples"></a>Examples
+</h4></div></div></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ Kind
+ </p>
+ </th>
+<th>
+ <p>
+ Description
+ </p>
+ </th>
+<th>
+ <p>
+ Result
+ </p>
+ </th>
+<th>
+ <p>
+ Ticket
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ BankAccount
+ </p>
+ </td>
+<td>
+ <p>
+ run
+ </p>
+ </td>
+<td>
+ <p>
+ tests
+ </p>
+ </td>
+<td>
+ <p>
+ Pass
+ </p>
+ </td>
+<td>
+ <p>
+ #
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ IL_BancAccount
+ </p>
+ </td>
+<td>
+ <p>
+ run
+ </p>
+ </td>
+<td>
+ <p>
+ tests
+ </p>
+ </td>
+<td>
+ <p>
+ Pass
+ </p>
+ </td>
+<td>
+ <p>
+ #
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ IL_Lockable_BancAccount
+ </p>
+ </td>
+<td>
+ <p>
+ run-fail
+ </p>
+ </td>
+<td>
+ <p>
+ tests
+ </p>
+ </td>
+<td>
+ <p>
+ Pass
+ </p>
+ </td>
+<td>
+ <p>
+ #
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ IL_Rec_Lockable_BancAccount
+ </p>
+ </td>
+<td>
+ <p>
+ run
+ </p>
+ </td>
+<td>
+ <p>
+ tests
+ </p>
+ </td>
+<td>
+ <p>
+ Pass
+ </p>
+ </td>
+<td>
+ <p>
+ #
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ IEL_Rec_Lockable_BancAccount
+ </p>
+ </td>
+<td>
+ <p>
+ run
+ </p>
+ </td>
+<td>
+ <p>
+ tests
+ </p>
+ </td>
+<td>
+ <p>
+ Pass
+ </p>
+ </td>
+<td>
+ <p>
+ #
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ EL_BancAccount
+ </p>
+ </td>
+<td>
+ <p>
+ run
+ </p>
+ </td>
+<td>
+ <p>
+ tests
+ </p>
+ </td>
+<td>
+ <p>
+ Pass
+ </p>
+ </td>
+<td>
+ <p>
+ #
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></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"><div class="copyright-footer">Copyright © 2008 Vicente J. Botet Escriba<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="acknowledgements.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../appendices.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="appendix_f__tickets.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/synchro/libs/synchro/doc/html/boost_synchro/appendices/appendix_f__tickets.html
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/html/boost_synchro/appendices/appendix_f__tickets.html 2009-10-12 17:49:35 EDT (Mon, 12 Oct 2009)
@@ -0,0 +1,171 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Appendix
+ F: Tickets</title>
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+<link rel="start" href="../../index.html" title="Chapter 1. Boost.Synchro">
+<link rel="up" href="../appendices.html" title="Appendices">
+<link rel="prev" href="appendix_e__tests.html" title="Appendix
+ E: Tests">
+<link rel="next" href="todo.html" title=" Appendix E: Future plans">
+</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">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="appendix_e__tests.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../appendices.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="todo.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_synchro.appendices.appendix_f__tickets"></a><a href="appendix_f__tickets.html" title="Appendix
+ F: Tickets">Appendix
+ F: Tickets</a>
+</h3></div></div></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Kind
+ </p>
+ </th>
+<th>
+ <p>
+ Identifier
+ </p>
+ </th>
+<th>
+ <p>
+ Description
+ </p>
+ </th>
+<th>
+ <p>
+ Resolution
+ </p>
+ </th>
+<th>
+ <p>
+ State
+ </p>
+ </th>
+<th>
+ <p>
+ Tests
+ </p>
+ </th>
+<th>
+ <p>
+ Version
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ feature
+ </p>
+ </td>
+<td>
+ <p>
+ v0.1#1
+ </p>
+ </td>
+<td>
+ <p>
+ array_locker
+ </p>
+ </td>
+<td>
+ <p>
+ See section
+ </p>
+ </td>
+<td>
+ <p>
+ Open
+ </p>
+ </td>
+<td>
+ <p>
+ See array_locker_tests
+ </p>
+ </td>
+<td>
+ <p>
+ v0.2
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ bug
+ </p>
+ </td>
+<td>
+ <p>
+ v0.2#1
+ </p>
+ </td>
+<td>
+ <p>
+ sync_buffer_monitor_test fails
+ </p>
+ </td>
+<td>
+ <p>
+ ---
+ </p>
+ </td>
+<td>
+ <p>
+ Open
+ </p>
+ </td>
+<td>
+ <p>
+ sync_buffer_monitor_test
+ </p>
+ </td>
+<td>
+ <p>
+ v0.2
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></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">Copyright © 2008 Vicente J. Botet Escriba<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="appendix_e__tests.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../appendices.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="todo.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/synchro/libs/synchro/doc/html/boost_synchro/appendices/history.html
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/html/boost_synchro/appendices/history.html 2009-10-12 17:49:35 EDT (Mon, 12 Oct 2009)
@@ -0,0 +1,202 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title> Appendix A: History</title>
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+<link rel="start" href="../../index.html" title="Chapter 1. Boost.Synchro">
+<link rel="up" href="../appendices.html" title="Appendices">
+<link rel="prev" href="../appendices.html" title="Appendices">
+<link rel="next" href="rationale.html" title=" Appendix B: Rationale">
+</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">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../appendices.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../appendices.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="rationale.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_synchro.appendices.history"></a> Appendix A: History
+</h3></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="history.html#boost_synchro.appendices.history.__version_0_3_3__may_24__2009____extraction_of_boost_rendez_vous_"><span class="bold"><strong>Version 0.3.3, May 24, 2009</strong></span> <span class="emphasis"><em>Extraction of
+ Boost.Rendez-Vous</em></span></a></span></dt>
+<dt><span class="section"><a href="history.html#boost_synchro.appendices.history.__version_0_3_2__may_08__2009____adaptation_boost_1_39___extraction_of_boost_conversion_"><span class="bold"><strong>Version 0.3.2, May 08, 2009</strong></span> <span class="emphasis"><em>Adaptation Boost
+ 1.39 + Extraction of Boost.Conversion</em></span></a></span></dt>
+<dt><span class="section"><a href="history.html#boost_synchro.appendices.history.__version_0_3_1__mars_29__2009____language_like_synchronized_block_macros_"><span class="bold"><strong>Version 0.3.1, Mars 29, 2009</strong></span> <span class="emphasis"><em>Language-like
+ Synchronized Block Macros</em></span></a></span></dt>
+<dt><span class="section"><a href="history.html#boost_synchro.appendices.history.__version_0_3_0__mars_19__2009____generic_free_operations_on_multiple_lockables___usage_of_boost_chrono_"><span class="bold"><strong>Version 0.3.0, Mars 19, 2009</strong></span> <span class="emphasis"><em>Generic free
+ operations on multiple lockables + Usage of Boost.Chrono</em></span></a></span></dt>
+<dt><span class="section"><a href="history.html#boost_synchro.appendices.history.__version_0_2_0__mars_1__2009____binary_semaphore___array_locker_"><span class="bold"><strong>Version 0.2.0, Mars 1, 2009</strong></span> <span class="emphasis"><em>binary_semaphore
+ + array_locker</em></span></a></span></dt>
+<dt><span class="section"><a href="history.html#boost_synchro.appendices.history.__version_0_1_0__febraury_16__2009____announcement_of_synchro_"><span class="bold"><strong>Version 0.1.0, Febraury 16, 2009</strong></span> <span class="emphasis"><em>Announcement
+ of Synchro</em></span></a></span></dt>
+</dl></div>
+<div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.appendices.history.__version_0_3_3__may_24__2009____extraction_of_boost_rendez_vous_"></a><a href="history.html#boost_synchro.appendices.history.__version_0_3_3__may_24__2009____extraction_of_boost_rendez_vous_" title="Version 0.3.3, May 24, 2009 Extraction of
+ Boost.Rendez-Vous"><span class="bold"><strong>Version 0.3.3, May 24, 2009</strong></span> <span class="emphasis"><em>Extraction of
+ Boost.Rendez-Vous</em></span></a>
+</h4></div></div></div></div>
+<div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.appendices.history.__version_0_3_2__may_08__2009____adaptation_boost_1_39___extraction_of_boost_conversion_"></a><a href="history.html#boost_synchro.appendices.history.__version_0_3_2__may_08__2009____adaptation_boost_1_39___extraction_of_boost_conversion_" title="Version 0.3.2, May 08, 2009 Adaptation Boost
+ 1.39 + Extraction of Boost.Conversion"><span class="bold"><strong>Version 0.3.2, May 08, 2009</strong></span> <span class="emphasis"><em>Adaptation Boost
+ 1.39 + Extraction of Boost.Conversion</em></span></a>
+</h4></div></div></div></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.appendices.history.__version_0_3_1__mars_29__2009____language_like_synchronized_block_macros_"></a><a href="history.html#boost_synchro.appendices.history.__version_0_3_1__mars_29__2009____language_like_synchronized_block_macros_" title="Version 0.3.1, Mars 29, 2009 Language-like
+ Synchronized Block Macros"><span class="bold"><strong>Version 0.3.1, Mars 29, 2009</strong></span> <span class="emphasis"><em>Language-like
+ Synchronized Block Macros</em></span></a>
+</h4></div></div></div>
+<p>
+ <span class="bold"><strong>New Features:</strong></span>
+ </p>
+<div class="itemizedlist"><ul type="disc"><li>
+ Language-like Synchronized Block Macros.
+ </li></ul></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.appendices.history.__version_0_3_0__mars_19__2009____generic_free_operations_on_multiple_lockables___usage_of_boost_chrono_"></a><a href="history.html#boost_synchro.appendices.history.__version_0_3_0__mars_19__2009____generic_free_operations_on_multiple_lockables___usage_of_boost_chrono_" title="Version 0.3.0, Mars 19, 2009 Generic free
+ operations on multiple lockables + Usage of Boost.Chrono"><span class="bold"><strong>Version 0.3.0, Mars 19, 2009</strong></span> <span class="emphasis"><em>Generic free
+ operations on multiple lockables + Usage of Boost.Chrono</em></span></a>
+</h4></div></div></div>
+<p>
+ <span class="bold"><strong>New Features:</strong></span>
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ Generic free functions on lockables: <code class="computeroutput"><span class="identifier">lock</span></code>,
+ <code class="computeroutput"><span class="identifier">try_lock</span></code>
+</li>
+<li>
+ Complete the generic free functions on multiple lockables in Boost.Thread
+ <code class="computeroutput"><span class="identifier">lock</span></code>, <code class="computeroutput"><span class="identifier">try_lock</span></code>
+ with:
+ <div class="itemizedlist"><ul type="circle"><li>
+<code class="computeroutput"><span class="identifier">lock_until</span></code>, <code class="computeroutput"><span class="identifier">lock_for</span></code>, <code class="computeroutput"><span class="identifier">try_lock_until</span></code>,
+ <code class="computeroutput"><span class="identifier">try_lock_for</span></code>, <code class="computeroutput"><span class="identifier">unlock</span></code>
+</li></ul></div>
+</li>
+</ul></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.appendices.history.__version_0_2_0__mars_1__2009____binary_semaphore___array_locker_"></a><a href="history.html#boost_synchro.appendices.history.__version_0_2_0__mars_1__2009____binary_semaphore___array_locker_" title="Version 0.2.0, Mars 1, 2009 binary_semaphore
+ + array_locker"><span class="bold"><strong>Version 0.2.0, Mars 1, 2009</strong></span> <span class="emphasis"><em>binary_semaphore
+ + array_locker</em></span></a>
+</h4></div></div></div>
+<p>
+ <span class="bold"><strong>New Features:</strong></span>
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<code class="computeroutput"><span class="identifier">binary_semaphore</span></code> emulation
+ with mutex
+ </li>
+<li>
+<code class="computeroutput"><span class="identifier">array_locker</span></code> locker containers.
+ </li>
+</ul></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.appendices.history.__version_0_1_0__febraury_16__2009____announcement_of_synchro_"></a><a href="history.html#boost_synchro.appendices.history.__version_0_1_0__febraury_16__2009____announcement_of_synchro_" title="Version 0.1.0, Febraury 16, 2009 Announcement
+ of Synchro"><span class="bold"><strong>Version 0.1.0, Febraury 16, 2009</strong></span> <span class="emphasis"><em>Announcement
+ of Synchro</em></span></a>
+</h4></div></div></div>
+<p>
+ <span class="bold"><strong>Features:</strong></span>
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ A uniform usage of Boost.Thread and Boost.Interprocess synchronization
+ mechanisms based on lockables(mutexes) concepts and locker(guards) concepts.
+ <div class="itemizedlist"><ul type="circle">
+<li>
+ lockables traits and lock generators,
+ </li>
+<li>
+ lock adapters of the Boost.Thread and Boost.Interprocess lockable
+ models,
+ </li>
+<li>
+ locker adapters of the Boost.Thread and Boost.Interprocess lockers
+ models,
+ </li>
+<li>
+ complete them with the corresponding models for single-threaded programms:
+ <code class="computeroutput"><span class="identifier">null_mutex</span></code> and <code class="computeroutput"><span class="identifier">null_condition</span></code> classes,
+ </li>
+<li>
+ locking families,
+ </li>
+<li>
+<code class="computeroutput"><span class="identifier">semaphore</span></code>,
+ </li>
+<li>
+<code class="computeroutput"><span class="identifier">condition_lockable</span></code>
+ lock put toghether a lock and its associated conditions.
+ </li>
+</ul></div>
+</li>
+<li>
+ Exception based timed lockables and lockers,
+ </li>
+<li>
+ A rich palete of lockers as
+ <div class="itemizedlist"><ul type="circle">
+<li>
+<code class="computeroutput"><span class="identifier">strict_locker</span></code>, <code class="computeroutput"><span class="identifier">nested_strict_locker</span></code>,
+ </li>
+<li>
+<code class="computeroutput"><span class="identifier">condition_locker</span></code>,
+ </li>
+<li>
+<code class="computeroutput"><span class="identifier">reverse_locker</span></code>,
+ <code class="computeroutput"><span class="identifier">nested_reverse_locker</span></code>,
+ </li>
+<li>
+<code class="computeroutput"><span class="identifier">locking_ptr</span></code>, <code class="computeroutput"><span class="identifier">on_derreference_locking_ptr</span></code>,
+ </li>
+<li>
+<code class="computeroutput"><span class="identifier">externally_locked</span></code>,
+ </li>
+</ul></div>
+</li>
+<li>
+ A polymorphic lockable hierarchy.
+ </li>
+<li>
+ High-level abstractions for handling more complicated synchronization
+ problems, including
+ <div class="itemizedlist"><ul type="circle"><li>
+<code class="computeroutput"><span class="identifier">monitor</span></code> for guaranteeing
+ exclusive access to an object, and
+ </li></ul></div>
+</li>
+</ul></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"><div class="copyright-footer">Copyright © 2008 Vicente J. Botet Escriba<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../appendices.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../appendices.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="rationale.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/synchro/libs/synchro/doc/html/boost_synchro/appendices/implementation.html
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/html/boost_synchro/appendices/implementation.html 2009-10-12 17:49:35 EDT (Mon, 12 Oct 2009)
@@ -0,0 +1,50 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title> Appendix C:
+ Implementation Notes</title>
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+<link rel="start" href="../../index.html" title="Chapter 1. Boost.Synchro">
+<link rel="up" href="../appendices.html" title="Appendices">
+<link rel="prev" href="rationale.html" title=" Appendix B: Rationale">
+<link rel="next" href="acknowledgements.html" title=" Appendix
+ D: Acknowledgements">
+</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">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="rationale.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../appendices.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="acknowledgements.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_synchro.appendices.implementation"></a><a href="implementation.html" title=" Appendix C:
+ Implementation Notes"> Appendix C:
+ Implementation Notes</a>
+</h3></div></div></div>
+<p>
+ TBC
+ </p>
+</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">Copyright © 2008 Vicente J. Botet Escriba<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="rationale.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../appendices.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="acknowledgements.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/synchro/libs/synchro/doc/html/boost_synchro/appendices/rationale.html
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/html/boost_synchro/appendices/rationale.html 2009-10-12 17:49:35 EDT (Mon, 12 Oct 2009)
@@ -0,0 +1,47 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title> Appendix B: Rationale</title>
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+<link rel="start" href="../../index.html" title="Chapter 1. Boost.Synchro">
+<link rel="up" href="../appendices.html" title="Appendices">
+<link rel="prev" href="history.html" title=" Appendix A: History">
+<link rel="next" href="implementation.html" title=" Appendix C:
+ Implementation Notes">
+</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">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="history.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../appendices.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="implementation.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_synchro.appendices.rationale"></a> Appendix B: Rationale
+</h3></div></div></div>
+<p>
+ TBC
+ </p>
+</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">Copyright © 2008 Vicente J. Botet Escriba<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="history.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../appendices.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="implementation.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/synchro/libs/synchro/doc/html/boost_synchro/appendices/todo.html
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/html/boost_synchro/appendices/todo.html 2009-10-12 17:49:35 EDT (Mon, 12 Oct 2009)
@@ -0,0 +1,56 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title> Appendix E: Future plans</title>
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+<link rel="start" href="../../index.html" title="Chapter 1. Boost.Synchro">
+<link rel="up" href="../appendices.html" title="Appendices">
+<link rel="prev" href="appendix_f__tickets.html" title="Appendix
+ F: Tickets">
+</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">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="appendix_f__tickets.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../appendices.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_synchro.appendices.todo"></a> Appendix E: Future plans
+</h3></div></div></div>
+<a name="boost_synchro.appendices.todo.tasks_to_do_before_review"></a><h4>
+<a name="id4921087"></a>
+ <a href="todo.html#boost_synchro.appendices.todo.tasks_to_do_before_review">Tasks
+ to do before review</a>
+ </h4>
+<div class="itemizedlist"><ul type="disc"><li>
+<code class="computeroutput"><span class="identifier">tuple_locker</span></code> locker containers.
+ </li></ul></div>
+<a name="boost_synchro.appendices.todo.for_later_releases"></a><h4>
+<a name="id4921128"></a>
+ <a href="todo.html#boost_synchro.appendices.todo.for_later_releases">For later
+ releases</a>
+ </h4>
+</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">Copyright © 2008 Vicente J. Botet Escriba<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="appendix_f__tickets.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../appendices.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a>
+</div>
+</body>
+</html>

Added: sandbox/synchro/libs/synchro/doc/html/boost_synchro/examples.html
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/html/boost_synchro/examples.html 2009-10-12 17:49:35 EDT (Mon, 12 Oct 2009)
@@ -0,0 +1,46 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Examples</title>
+<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+<link rel="start" href="../index.html" title="Chapter 1. Boost.Synchro">
+<link rel="up" href="../index.html" title="Chapter 1. Boost.Synchro">
+<link rel="prev" href="reference/high_level.html" title="High Level">
+<link rel="next" href="appendices.html" title="Appendices">
+</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">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="reference/high_level.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="appendices.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="boost_synchro.examples"></a>Examples
+</h2></div></div></div>
+<p>
+ This section includes complete examples using the library.
+ </p>
+</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">Copyright © 2008 Vicente J. Botet Escriba<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="reference/high_level.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="appendices.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/synchro/libs/synchro/doc/html/boost_synchro/overview.html
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/html/boost_synchro/overview.html 2009-10-12 17:49:35 EDT (Mon, 12 Oct 2009)
@@ -0,0 +1,250 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title> Overview</title>
+<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+<link rel="start" href="../index.html" title="Chapter 1. Boost.Synchro">
+<link rel="up" href="../index.html" title="Chapter 1. Boost.Synchro">
+<link rel="prev" href="../index.html" title="Chapter 1. Boost.Synchro">
+<link rel="next" href="overview/intro.html" title=" Introduction">
+</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">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../index.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="overview/intro.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="boost_synchro.overview"></a> Overview
+</h2></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"> Introduction</span></dt>
+<dd><dl>
+<dt><span class="section"><a href="overview/intro.html#boost_synchro.overview.intro.uniform"> Using Thread,
+ Interprocess and Null synchronization mechanisms uniformly</a></span></dt>
+<dt><span class="section"><a href="overview/intro.html#boost_synchro.overview.intro.mapping_the_current_mutexes__boost_thread_and_boost_interprocess__to_the_common_concepts">Mapping
+ the current mutexes (Boost.Thread and Boost/Interprocess) to the common concepts</a></span></dt>
+<dt><span class="section"><a href="overview/intro.html#boost_synchro.overview.intro.condition_lockable">Condition
+ lockable</a></span></dt>
+<dt><span class="section"><a href="overview/intro.html#boost_synchro.overview.intro.exception_based_timed_locks">Exception-based
+ Timed Locks</a></span></dt>
+<dt><span class="section"> Lockers</span></dt>
+<dt><span class="section"> Polymorphic lockable</span></dt>
+<dt><span class="section"><a href="overview/intro.html#boost_synchro.overview.intro.language_like_synchronized_block_">Language-like
+ Synchronized Block </a></span></dt>
+<dt><span class="section"> Monitors</span></dt>
+</dl></dd>
+</dl></div>
+<a name="boost_synchro.overview.description"></a><h3>
+<a name="id4803123"></a>
+ Description
+ </h3>
+<p>
+ To date, C++ multi threaded programs that need to be efficient use the same
+ mutexes, semaphores, and events that Dijkstra described 40 years ago. This
+ unfortunate state of affairs makes multi threaded programs difficult to design,
+ debug, ensure correct, optimize, maintain, and analyze formally. Consequently,
+ building tools that automate detection of race conditions and deadlocks is
+ highly desirable.
+ </p>
+<p>
+ I believe that most of the synchronization mechanisms applied to multi-threaded
+ programs works as well for multi-process programs. This can not be done if
+ the basic facilities mutexes and condition variables are not based on common
+ concepts and take a different form depending of the library provider. We need
+ to states these bases through concepts.
+ </p>
+<p>
+ The main sources of inspiration of this library were
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ the papers of Kevlin Henney about asynchronous C++ <a href="http://www.two-sdg.demon.co.uk/curbralan/papers/accu/MoreC++Threading.pdf" target="_top">More
+ C++ Threading - From Procedural to Generic, by Example</a> and its C++0x
+ proposal [<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1883.pdf" target="_top">N1833
+ - Preliminary Threading Library Proposal for TR2</a>].
+ </li>
+<li>
+ the papers of Andrei Alexandrescu on multi-threading programming <a href="http://www.ddj.com/cpp/184403766" target="_top">volatile
+ - Multithreaded Programmer's Best Friend</a>
+</li>
+<li>
+ the ACE framework of Douglas C. Schmidt <a href="http://www.cs.wustl.edu/~schmidt/PDF/ACE-concurrency.pdf" target="_top">An
+ OO Encapsulation of Lightweight OS Concurrency Mechanisms in the ACE Toolkit</a>.
+ </li>
+</ul></div>
+<p>
+ This library is a compilation of what I have found in the literature not yet
+ present in Boost. My main concen has been to boostify all these ideas in a
+ coherent way.
+ </p>
+<p>
+ <span class="bold"><strong>Boost.Synchro</strong></span> provides:
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ A uniform usage of Boost.Thread and Boost.Interprocess synchronization mechanisms
+ based on lockables(mutexes) concepts and locker(guards) concepts.
+ <div class="itemizedlist"><ul type="circle">
+<li>
+ lockables traits and lock generators,
+ </li>
+<li>
+ generic free functions on lockables as: <code class="computeroutput"><span class="identifier">lock</span></code>,
+ <code class="computeroutput"><span class="identifier">try_lock</span></code>, ...
+ </li>
+<li>
+ locker adapters of the Boost.Thread and Boost.Interprocess lockers models,
+ </li>
+<li>
+ complete them with the corresponding models for single-threaded programms:
+ <code class="computeroutput"><span class="identifier">null_mutex</span></code> and <code class="computeroutput"><span class="identifier">null_condition</span></code> classes,
+ </li>
+<li>
+ locking families,
+ </li>
+<li>
+<code class="computeroutput"><span class="identifier">semaphore</span></code> and <code class="computeroutput"><span class="identifier">binary_semaphore</span></code>,
+ </li>
+<li>
+<code class="computeroutput"><span class="identifier">condition_lockable</span></code> lock
+ which put toghether a lock and its associated conditions.
+ </li>
+</ul></div>
+</li>
+<li>
+ A coherent way exception based timed lock approach for functions and constructors,
+ </li>
+<li>
+ A rich palete of lockers as
+ <div class="itemizedlist"><ul type="circle">
+<li>
+<code class="computeroutput"><span class="identifier">strict_locker</span></code>, <code class="computeroutput"><span class="identifier">nested_strict_locker</span></code>,
+ </li>
+<li>
+<code class="computeroutput"><span class="identifier">condition_locker</span></code>,
+ </li>
+<li>
+<code class="computeroutput"><span class="identifier">reverse_locker</span></code>, <code class="computeroutput"><span class="identifier">nested_reverse_locker</span></code>,
+ </li>
+<li>
+<code class="computeroutput"><span class="identifier">locking_ptr</span></code>, <code class="computeroutput"><span class="identifier">on_derreference_locking_ptr</span></code>,
+ </li>
+<li>
+<code class="computeroutput"><span class="identifier">externally_locked</span></code>,
+ </li>
+</ul></div>
+</li>
+<li>
+<code class="computeroutput"><span class="identifier">array_unique_locker</span></code> on multiple
+ lockables.
+ </li>
+<li>
+ Generic free functions on multiple lockables <code class="computeroutput"><span class="identifier">lock</span></code>,
+ <code class="computeroutput"><span class="identifier">try_lock</span></code>, <code class="computeroutput"><span class="identifier">lock_until</span></code>,
+ <code class="computeroutput"><span class="identifier">lock_for</span></code>, <code class="computeroutput"><span class="identifier">try_lock_until</span></code>,
+ <code class="computeroutput"><span class="identifier">try_lock_for</span></code>, <code class="computeroutput"><span class="identifier">unlock</span></code> * lock adapters of the Boost.Thread
+ and Boost.Interprocess lockable models,
+ <div class="itemizedlist"><ul type="circle"><li>
+<code class="computeroutput"><span class="identifier">lock_until</span></code>, <code class="computeroutput"><span class="identifier">lock_for</span></code>, <code class="computeroutput"><span class="identifier">try_lock_until</span></code>,
+ <code class="computeroutput"><span class="identifier">try_lock_for</span></code>
+</li></ul></div>
+</li>
+<li>
+ A polymorphic lockable hierarchy.
+ </li>
+<li>
+ High-level abstractions for handling more complicated synchronization problems,
+ including
+ <div class="itemizedlist"><ul type="circle"><li>
+<code class="computeroutput"><span class="identifier">monitor</span></code> for guaranteeing
+ exclusive access to an object.
+ </li></ul></div>
+</li>
+<li>
+ Language-like Synchronized Block Macros
+ </li>
+</ul></div>
+<a name="boost_synchro.overview.how_to_use_this_documentation"></a><h3>
+<a name="id4765093"></a>
+ <a href="overview.html#boost_synchro.overview.how_to_use_this_documentation">How to
+ Use This Documentation</a>
+ </h3>
+<p>
+ This documentation makes use of the following naming and formatting conventions.
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ Code is in <code class="computeroutput"><span class="identifier">fixed</span> <span class="identifier">width</span>
+ <span class="identifier">font</span></code> and is syntax-highlighted.
+ </li>
+<li>
+ Replaceable text that you will need to supply is in
+ <em class="replaceable"><code>
+ italics
+ </code></em>
+ .
+ </li>
+<li>
+ If a name refers to a free function, it is specified like this: <code class="computeroutput"><span class="identifier">free_function</span><span class="special">()</span></code>;
+ that is, it is in code font and its name is followed by <code class="computeroutput"><span class="special">()</span></code>
+ to indicate that it is a free function.
+ </li>
+<li>
+ If a name refers to a class template, it is specified like this: <code class="computeroutput"><span class="identifier">class_template</span><span class="special">&lt;&gt;</span></code>;
+ that is, it is in code font and its name is followed by <code class="computeroutput"><span class="special">&lt;&gt;</span></code>
+ to indicate that it is a class template.
+ </li>
+<li>
+ If a name refers to a function-like macro, it is specified like this: <code class="computeroutput"><span class="identifier">MACRO</span><span class="special">()</span></code>;
+ that is, it is uppercase in code font and its name is followed by <code class="computeroutput"><span class="special">()</span></code> to indicate that it is a function-like
+ macro. Object-like macros appear without the trailing <code class="computeroutput"><span class="special">()</span></code>.
+ </li>
+<li>
+ Names that refer to <span class="emphasis"><em>concepts</em></span> in the generic programming
+ sense are specified in CamelCase.
+ </li>
+</ul></div>
+<div class="note"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../doc/html/images/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ In addition, notes such as this one specify non-essential information that
+ provides additional background or rationale.
+ </p></td></tr>
+</table></div>
+<p>
+ Finally, you can mentally add the following to any code fragments in this document:
+ </p>
+<pre class="programlisting"><span class="comment">// Include all of Synchro files
+</span><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+
+<span class="comment">// Create a namespace aliases
+</span><span class="keyword">namespace</span> <span class="identifier">bsynchro</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">synchro</span><span class="special">;</span>
+</pre>
+</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">Copyright © 2008 Vicente J. Botet Escriba<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../index.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="overview/intro.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/synchro/libs/synchro/doc/html/boost_synchro/overview/intro.html
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/html/boost_synchro/overview/intro.html 2009-10-12 17:49:35 EDT (Mon, 12 Oct 2009)
@@ -0,0 +1,901 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title> Introduction</title>
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+<link rel="start" href="../../index.html" title="Chapter 1. Boost.Synchro">
+<link rel="up" href="../overview.html" title=" Overview">
+<link rel="prev" href="../overview.html" title=" Overview">
+<link rel="next" href="../users_guide.html" title=" Users'Guide">
+</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">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../overview.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../overview.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../users_guide.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_synchro.overview.intro"></a> Introduction
+</h3></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="intro.html#boost_synchro.overview.intro.uniform"> Using Thread,
+ Interprocess and Null synchronization mechanisms uniformly</a></span></dt>
+<dt><span class="section"><a href="intro.html#boost_synchro.overview.intro.mapping_the_current_mutexes__boost_thread_and_boost_interprocess__to_the_common_concepts">Mapping
+ the current mutexes (Boost.Thread and Boost/Interprocess) to the common concepts</a></span></dt>
+<dt><span class="section"><a href="intro.html#boost_synchro.overview.intro.condition_lockable">Condition
+ lockable</a></span></dt>
+<dt><span class="section"><a href="intro.html#boost_synchro.overview.intro.exception_based_timed_locks">Exception-based
+ Timed Locks</a></span></dt>
+<dt><span class="section"> Lockers</span></dt>
+<dt><span class="section"> Polymorphic lockable</span></dt>
+<dt><span class="section"><a href="intro.html#boost_synchro.overview.intro.language_like_synchronized_block_">Language-like
+ Synchronized Block </a></span></dt>
+<dt><span class="section"> Monitors</span></dt>
+</dl></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.overview.intro.uniform"></a><a href="intro.html#boost_synchro.overview.intro.uniform" title=" Using Thread,
+ Interprocess and Null synchronization mechanisms uniformly"> Using Thread,
+ Interprocess and Null synchronization mechanisms uniformly</a>
+</h4></div></div></div>
+<p>
+ One of the problems when doing multi threaded application with Boost.Thread
+ and Boost.Interprocess is that the synchronization mechanism of these two
+ libraries even if they are very close since the release 1.35, there are
+ some minor differences that make quite difficult to design a class that
+ can work independently with synchronization mechanisms of both libraries.
+ </p>
+<p>
+ This library proposes some classes that allows to write code that can be
+ used indistinguishably with thread or interprocess synchronization mechanisms.
+ This section is inspired on the work from <span class="bold"><strong>C++ Threading
+ - A Generic-Programming Approach</strong></span> - Kevlin Henney.
+ </p>
+<p>
+ <span class="bold"><strong>Lock substitutability</strong></span>
+ </p>
+<p>
+ The Boost (C++0x) mutexes have associated a category which form a sub-typing
+ hierarchy:
+ </p>
+<pre class="programlisting"><span class="identifier">ExclusiveLockable</span> <span class="special">&lt;-</span> <span class="identifier">SharedLockable</span> <span class="special">&lt;-</span> <span class="identifier">UpgradeLockable</span>
+</pre>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">exclusive_lock_tag</span> <span class="special">{};</span>
+<span class="keyword">struct</span> <span class="identifier">sharable_lock_tag</span> <span class="special">:</span> <span class="identifier">exclusive_lock_tag</span> <span class="special">{};</span>
+<span class="keyword">struct</span> <span class="identifier">upgradable_lock_tag</span> <span class="special">:</span> <span class="identifier">sharable_lock_tag</span> <span class="special">{};</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Locking behavior can be further categorized as:
+ </p>
+<div class="itemizedlist"><ul type="disc"><li>
+ Re-entrancy: recursive or not
+ </li></ul></div>
+<pre class="programlisting"><span class="identifier">non_recursive</span> <span class="special">&lt;-</span> <span class="identifier">recursive</span>
+</pre>
+<div class="itemizedlist"><ul type="disc"><li>
+ Scope: whether the lock is usable with a mono-threaded, multi-threaded
+ or multi-process context
+ </li></ul></div>
+<pre class="programlisting"><span class="identifier">mono_threaded</span> <span class="special">&lt;-</span> <span class="identifier">multi_threaded</span> <span class="special">&lt;-</span> <span class="identifier">multi_process</span>
+</pre>
+<div class="itemizedlist"><ul type="disc"><li>
+ Lifetime: The lifetime of a lock could be associated to the process,
+ the kernel or the file-system
+ </li></ul></div>
+<pre class="programlisting"><span class="identifier">process_lifetime</span> <span class="special">&lt;-</span> <span class="identifier">kernel_lifetime</span> <span class="special">&lt;-</span> <span class="identifier">filesystem_lifetime</span>
+</pre>
+<div class="itemizedlist"><ul type="disc"><li>
+ Timed interface: has or not a timed interfaces
+ </li></ul></div>
+<pre class="programlisting"><span class="identifier">hasnt_timed_interface</span> <span class="special">&lt;-</span> <span class="identifier">has_timed_interface</span>
+</pre>
+<p>
+ Substitutability applies both to the degree of syntactic support and to
+ the locking semantics
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ A recursive mutex and binary semaphore are substitutable in code written
+ against a exclusive mutex
+ </li>
+<li>
+ A null mutex is substitutable for all others in a single-threaded environment
+ </li>
+</ul></div>
+<p>
+ We can see these axes of variation expressed against some Boost synchronization
+ mechanisms (from now bip stands for boost::interprocess):
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ boost::mutex: ExclusiveLock, non-recursive, has-not-timed-interface,
+ multi-threaded
+ </li>
+<li>
+ boost::shared_mutex: UpgradableLock, non-recursive, has-timed-interface,
+ multi-threaded
+ </li>
+<li>
+ bip::synchro::null_mutex: UpgradableLock, recursive, has-timed-interface,
+ mono-threaded
+ </li>
+<li>
+ bip::synchro::interprocess_recursive_mutex ExclusiveLock, recursive,
+ has-timed-interface, multi_process.
+ </li>
+</ul></div>
+<p>
+ <span class="bold"><strong>Lock traits</strong></span>
+ </p>
+<p>
+ The Boost.Synchro library contains a set of very specific traits classes,
+ some of them encapsulate a single trait for a Lockable type; for example,
+ is a lock recursive (is_recursive), is useful in a multi threaded context
+ (is_multi_threaded).
+ </p>
+<p>
+ The Boost.Synchro lock-traits classes share a unified design that mimic
+ the one of Boost.TypeTraits: each class inherits from a the type true_type
+ if the type has the specified property and inherits from false_type otherwise.
+ </p>
+<p>
+ Boost.Synchro also contains a set of classes that perform a specific transformation
+ on a type; for example, they can remove a top-level const or volatile qualifier
+ from a type. Each class that performs a transformation defines a single
+ typedef-member type that is the result of the transformation.
+ </p>
+<p>
+ <span class="bold"><strong>Finding the best lock</strong></span>
+ </p>
+<p>
+ Inverse traits can match a lockable type based on specific traits, for
+ a given family of lock types.
+ </p>
+<p>
+ It is also possible to specify characteristics to perform a reverse lookup
+ to find a primitive lock type, either by exact match or by substitutable
+ match.
+ </p>
+<p>
+ <span class="bold"><strong>Synchronization family</strong></span>
+ </p>
+<p>
+ A class that will do internal locking can be parameterized by the type
+ of synchronization family needed to achieve the desired level of concurrency
+ control. This depends of the usage scope of this class, and this can be
+ mono_threaded, multi_threaded, multi_process.
+ </p>
+<p>
+ For example the thread_synchronization_family can be used to instantiate
+ a message_queue class in a multi_threaded environment, all public methods
+ will be thread-safe, with the corresponding overhead that implies. In contrast,
+ if a null_synchronization_policy class is used to instantiate message_queue,
+ all public methods will not be thread-safe, and there will be no additional
+ overhead.
+ </p>
+<p>
+ <span class="bold"><strong>Syntactic lock traits</strong></span>
+ </p>
+<p>
+ The Boost.Synchro library also contains classes that try to remove the
+ syntactic differences between the synchronization mechanisms of the Boost.Thread
+ and Boost::Interprocess libraries. The differences identified up to now
+ are:
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ The scoped locks live in a different namespace and some have different
+ names with the same semantic. IMO these should be shared.
+ </li>
+<li>
+ The exception thrown lives in a different name space and different names
+ with the same semantic.
+ </li>
+<li>
+ This exception should be common.
+ </li>
+<li>
+ The move semantics (&amp;&amp;) are expressed with a class named differently.
+ This class could be a good candidate of Boost library by itself.
+ </li>
+<li>
+ The scoped locks can be initialized with static const variables in order
+ to overload the constructor for lock adoption, lock deferral or try to
+ lock. Even if the name of these variables is the same, these variables
+ live in different namespace. It would be nice if these both libraries
+ use the same type and the same variables
+ </li>
+</ul></div>
+<p>
+ I hope that these two Boost libraries will merge their synchronization
+ mechanisms in a near future. Waiting for this merge this could serve as
+ a temporary solution.
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.overview.intro.mapping_the_current_mutexes__boost_thread_and_boost_interprocess__to_the_common_concepts"></a><a href="intro.html#boost_synchro.overview.intro.mapping_the_current_mutexes__boost_thread_and_boost_interprocess__to_the_common_concepts" title="Mapping
+ the current mutexes (Boost.Thread and Boost/Interprocess) to the common concepts">Mapping
+ the current mutexes (Boost.Thread and Boost/Interprocess) to the common concepts</a>
+</h4></div></div></div>
+<p>
+ The mapping from the current mutexes and scoped guards (Boost.Thread and
+ Boost/Interprocess) to the common concepts has been done adding a indirection
+ level. Instead of requiring a given member function, the lockable concepts
+ reside in fre functions. Neither the Boost.Thread nor Boost/Interprocess
+ mutexes and locks are based on functions, but can see them as models of
+ the common lockable and loker concepts by specializing these generic free
+ functions. In order to make easier the mapping these functions call by
+ default to a member function with the equivalent signature.
+ </p>
+<p>
+ For example thread_timed_mutex is viwed as a lockable by specializing the
+ folloxing functions:
+ </p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">lock_until</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">timed_mutex</span><span class="special">,</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">&gt;</span> <span class="special">{</span>
+ <span class="keyword">static</span> <span class="keyword">void</span>
+ <span class="identifier">apply</span><span class="special">(</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">timed_mutex</span><span class="special">&amp;</span> <span class="identifier">lockable</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">&gt;&amp;</span> <span class="identifier">abs_time</span> <span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">if</span><span class="special">(!</span><span class="identifier">lockable</span><span class="special">.</span><span class="identifier">timed_lock</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">convert_to</span><span class="special">&lt;</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">ptime</span><span class="special">&gt;(</span><span class="identifier">abs_time</span><span class="special">)))</span> <span class="keyword">throw</span> <span class="identifier">timeout_exception</span><span class="special">();</span>
+ <span class="special">}</span>
+ <span class="special">};</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">lock_for</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">timed_mutex</span><span class="special">,</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">&gt;</span> <span class="special">{</span>
+ <span class="keyword">static</span> <span class="keyword">void</span>
+ <span class="identifier">apply</span><span class="special">(</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">timed_mutex</span><span class="special">&amp;</span> <span class="identifier">lockable</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special">&lt;</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">&gt;&amp;</span> <span class="identifier">rel_time</span> <span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">if</span><span class="special">(!</span><span class="identifier">lockable</span><span class="special">.</span><span class="identifier">timed_lock</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">convert_to</span><span class="special">&lt;</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">time_duration</span><span class="special">&gt;(</span><span class="identifier">rel_time</span><span class="special">)))</span> <span class="keyword">throw</span> <span class="identifier">timeout_exception</span><span class="special">();</span>
+ <span class="special">}</span>
+ <span class="special">};</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">try_lock_until</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">timed_mutex</span><span class="special">,</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">&gt;</span> <span class="special">{</span>
+ <span class="keyword">static</span> <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">try_lock_until</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">timed_mutex</span><span class="special">,</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">apply</span><span class="special">(</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">timed_mutex</span><span class="special">&amp;</span> <span class="identifier">lockable</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">&gt;&amp;</span> <span class="identifier">abs_time</span> <span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">lockable</span><span class="special">.</span><span class="identifier">timed_lock</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">convert_to</span><span class="special">&lt;</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">ptime</span><span class="special">&gt;(</span><span class="identifier">abs_time</span><span class="special">));</span>
+ <span class="special">}</span>
+ <span class="special">};</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">try_lock_for</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">timed_mutex</span><span class="special">,</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">&gt;</span> <span class="special">{</span>
+ <span class="keyword">static</span> <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">try_lock_for</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">timed_mutex</span><span class="special">,</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">apply</span><span class="special">(</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">timed_mutex</span><span class="special">&amp;</span> <span class="identifier">lockable</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special">&lt;</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">&gt;&amp;</span> <span class="identifier">rel_time</span> <span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">lockable</span><span class="special">.</span><span class="identifier">timed_lock</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">convert_to</span><span class="special">&lt;</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">time_duration</span><span class="special">&gt;(</span><span class="identifier">rel_time</span><span class="special">));</span>
+ <span class="special">}</span>
+ <span class="special">};</span>
+<span class="special">}</span>
+</pre>
+<p>
+ Note that only the functions for which the equivalent signature differ
+ are defined. For the others the default works as expected.
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.overview.intro.condition_lockable"></a><a href="intro.html#boost_synchro.overview.intro.condition_lockable" title="Condition
+ lockable">Condition
+ lockable</a>
+</h4></div></div></div>
+<p>
+ Based on the idead of Kevlin Henney, the library provides condition lockable,
+ which allows a condition variable to be associated with a Lockable.
+ </p>
+<p>
+ Treating condition locking as a property of Lockable rather than viceversa
+ has the benefit of making clear how something is locked and accessed, as
+ it were emphasising it in the first person.
+ </p>
+<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">product_queue</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="special">...</span>
+ <span class="identifier">product</span> <span class="special">*</span><span class="identifier">pull</span><span class="special">()</span> <span class="special">{</span>
+ <span class="identifier">mtx</span><span class="special">.</span><span class="identifier">lock</span><span class="special">();</span>
+ <span class="keyword">while</span><span class="special">(</span><span class="identifier">queue</span><span class="special">.</span><span class="identifier">empty</span><span class="special">())</span>
+ <span class="identifier">guard</span><span class="special">.</span><span class="identifier">relock_on</span><span class="special">(</span><span class="identifier">not_empty</span><span class="special">);</span>
+ <span class="identifier">product</span> <span class="special">*</span><span class="identifier">pulled</span> <span class="special">=</span> <span class="identifier">queue</span><span class="special">.</span><span class="identifier">front</span><span class="special">();</span>
+ <span class="identifier">queue</span><span class="special">.</span><span class="identifier">pop</span><span class="special">();</span>
+ <span class="identifier">mtx</span><span class="special">.</span><span class="identifier">unlock</span><span class="special">();</span>
+ <span class="keyword">return</span> <span class="identifier">pulled</span><span class="special">;</span>
+ <span class="special">}</span>
+ <span class="special">...</span>
+<span class="special">};</span>
+</pre>
+<p>
+ Requiring the user of a condition variable to implement a while loop to
+ verify a condition's predicate is potentially error prone. It can be better
+ encapsulated by passing the predicate as a function object to the locking
+ function.
+ </p>
+<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">product_queue</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="special">...</span>
+ <span class="identifier">product</span> <span class="special">*</span><span class="identifier">pull</span><span class="special">()</span> <span class="special">{</span>
+ <span class="identifier">mtx</span><span class="special">.</span><span class="identifier">lock_when</span><span class="special">(</span><span class="identifier">not_empty</span><span class="special">,</span> <span class="identifier">has_products</span><span class="special">(</span><span class="identifier">queue</span><span class="special">));</span>
+ <span class="identifier">product</span> <span class="special">*</span><span class="identifier">pulled</span> <span class="special">=</span> <span class="identifier">queue</span><span class="special">.</span><span class="identifier">front</span><span class="special">();</span>
+ <span class="identifier">queue</span><span class="special">.</span><span class="identifier">pop</span><span class="special">();</span>
+ <span class="identifier">mtx</span><span class="special">.</span><span class="identifier">unlock</span><span class="special">();</span>
+ <span class="keyword">return</span> <span class="identifier">pulled</span><span class="special">;</span>
+ <span class="special">}</span>
+ <span class="special">...</span>
+<span class="special">};</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.overview.intro.exception_based_timed_locks"></a><a href="intro.html#boost_synchro.overview.intro.exception_based_timed_locks" title="Exception-based
+ Timed Locks">Exception-based
+ Timed Locks</a>
+</h4></div></div></div>
+<p>
+ Based on the idead of Kevlin Henney, the library supports timeout exception
+ for all the locking functions having a time or duration parameter.
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ A lock with a timeout parameter, i.e. a time or a duration, throws a
+ <code class="computeroutput"><span class="identifier">timeout_exception</span></code> on
+ expiry
+ </li>
+<li>
+ A <code class="computeroutput"><span class="identifier">try_lock</span></code> with a timeout
+ simply returns false on expiry
+ </li>
+<li>
+ Any of the conditional locks throw a <code class="computeroutput"><span class="identifier">timeout_exception</span></code>
+ on expiry
+ </li>
+<li>
+ all the locker constructors with the first parameter a timeout.
+ </li>
+</ul></div>
+<p>
+ Use of timeouts can create more robust programs, by not blocking forever,
+ but at the same time one needs to avoid annoyingly arbitrary limits.
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.overview.intro.lockers"></a> Lockers
+</h4></div></div></div>
+<p>
+ Typically, object-oriented programs use object-level locking by associating
+ a synchronization object (mutex) with each object that is susceptible to
+ be shared between threads. Then, code that manipulates the state of the
+ object can synchronize by locking that object. Inside a synchronized section,
+ the mutex associated with the object is locked, and consequently that object's
+ fields can be accessed safely.
+ </p>
+<p>
+ In C++, this fundamental idiom is typically implemented with a helper Locker
+ object or lock guard.
+ </p>
+<p>
+ A locker is any object or function responsible for coordinating the use
+ of lockable objects.
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ Lockers depend on lockable objects - which need not be locking primitives
+ - and not vice-versa. This avoids cycles in the dependency graph.
+ </li>
+<li>
+ Lockers are applications of lockable objects and, as such, form a potentially
+ unbounded family. Most common role of lockers is for exception safety
+ and programming convenience
+ </li>
+<li>
+ Lockers execute-around the lock-unlock pairing.
+ </li>
+</ul></div>
+<p>
+ A locker defines an execution strategy for locking and unlocking that is
+ automated by construction and destruction. It simplifies common use of
+ locking, and does so in an exception-safe fashion. As such, lockers depend
+ on the interface of lockables -e.g. lock and unlock - but lockables do
+ not depend on lockers. The relationship is strictly layered, open and extensible:
+ lockable types may be whole, externally locked objects against which existing
+ lockers can be used; new lockers can be defined that work against existing
+ lockable types.
+ </p>
+<p>
+ Substitutability between lockables and lockers does not make sense, so
+ the constructor is always explicit. Implicit copyability is also disabled.
+ </p>
+<p>
+ Boost.Thread and Boost.Interprocess defines already a good starting point
+ with these lockers:
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">lock_guard</span></code>,
+ </li>
+<li>
+<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">unique_lock</span></code>, <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">interprocess</span><span class="special">::</span><span class="identifier">unique_lock</span></code>
+ and <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">interprocess</span><span class="special">::</span><span class="identifier">scoped_lock</span></code>
+</li>
+<li>
+<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">share_lock</span></code> and <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">interprocess</span><span class="special">::</span><span class="identifier">sharable_lock</span></code>
+</li>
+<li>
+<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">upgrade_lock</span></code> and <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">interprocess</span><span class="special">::</span><span class="identifier">upgradable_lock</span></code>.
+ </li>
+</ul></div>
+<p>
+ The problem is that even if these locker models the same model, there is
+ no a single syntax.
+ </p>
+<p>
+ The library defines some locker adapters which take care of naming differences
+ and that can be used like
+ </p>
+<pre class="programlisting"><span class="identifier">bsynchro</span><span class="special">::</span><span class="identifier">unique_locker</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mutex</span><span class="special">&gt;</span> <span class="identifier">scoped</span><span class="special">(</span><span class="identifier">guard</span><span class="special">);</span>
+</pre>
+<p>
+ or
+ </p>
+<pre class="programlisting"><span class="identifier">bsynchro</span><span class="special">::</span><span class="identifier">unique_locker</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">interprocess</span><span class="special">::</span><span class="identifier">interprocess_mutex</span><span class="special">&gt;</span> <span class="identifier">scoped</span><span class="special">(</span><span class="identifier">guard</span><span class="special">);</span>
+</pre>
+<p>
+ <span class="bold"><strong>Strict lockers</strong></span>
+ </p>
+<p>
+ Strict lockers were first introduced by Andrei Alexandrescu. A strict locker
+ is a scoped lock guard ensuring the mutex is locked on the scope of the
+ lock, by locking the mutex on construction and unlocking it on destruction.
+ </p>
+<p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">lock_guard</span></code> could be seen as a strict_locker
+ if the following constructor didn't exists
+ </p>
+<pre class="programlisting"><span class="identifier">lock_guard</span><span class="special">(</span><span class="identifier">Lockable</span> <span class="special">&amp;</span> <span class="identifier">m</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adopt_lock_t</span><span class="special">)</span>
+</pre>
+<p>
+ We can say that lock_guard is a strict locker "sur parolle".
+ </p>
+<p>
+ There is a const function that is very useful when working with strict
+ lockers and external locking which check is the strict locker is locking
+ an instace of a lockable.
+ </p>
+<pre class="programlisting"><span class="keyword">bool</span> <span class="identifier">is_locking</span><span class="special">(</span><span class="identifier">lockable_type</span><span class="special">*</span> <span class="identifier">l</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+</pre>
+<p>
+ The library provides three strict lockers
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<code class="computeroutput"><span class="identifier">strict_locker</span></code>: is the
+ basic strict locker, special use when doing external locking.
+ </li>
+<li>
+<code class="computeroutput"><span class="identifier">neested_strict_locker</span></code>:
+ is a strict_locker of another locker as a unique_lock.
+ </li>
+<li>
+<code class="computeroutput"><span class="identifier">conditional_unique_locker</span></code>
+ and <code class="computeroutput"><span class="identifier">conditional_shared_locker</span></code>
+ : are strict lockers with the condition_lockable interface. These are
+ the synchronizer of the monitor class.
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">product_queue</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="special">...</span>
+ <span class="identifier">product</span> <span class="special">*</span><span class="identifier">pull</span><span class="special">()</span> <span class="special">{</span>
+ <span class="identifier">conditional_unique_locker</span><span class="special">&lt;&gt;</span> <span class="identifier">_</span><span class="special">(</span><span class="identifier">mtx</span><span class="special">,</span> <span class="identifier">not_empty</span><span class="special">,</span> <span class="identifier">has_products</span><span class="special">(</span><span class="identifier">queue</span><span class="special">));</span>
+ <span class="identifier">product</span> <span class="special">*</span><span class="identifier">pulled</span> <span class="special">=</span> <span class="identifier">queue</span><span class="special">.</span><span class="identifier">front</span><span class="special">();</span>
+ <span class="identifier">queue</span><span class="special">.</span><span class="identifier">pop</span><span class="special">();</span>
+ <span class="identifier">mtx</span><span class="special">.</span><span class="identifier">unlock</span><span class="special">();</span>
+ <span class="keyword">return</span> <span class="identifier">pulled</span><span class="special">;</span>
+ <span class="special">}</span>
+ <span class="special">...</span>
+<span class="special">};</span>
+</pre>
+<p>
+ and a meta function <code class="computeroutput"><span class="identifier">is_strict_locker</span></code>
+ which states if a locker is a strict locker.
+ </p>
+<p>
+ So as strict lockers do not provide lock/unlock functions they are not
+ models of Lockable.
+ </p>
+<p>
+ <span class="bold"><strong>Try lockers</strong></span>
+ </p>
+<p>
+ A Try Locker is a Locker that initialize it in a such way that instead
+ of locking on the constructor with <code class="computeroutput"><span class="identifier">lock</span><span class="special">()</span></code> they can try to lock with <code class="computeroutput"><span class="identifier">try_lock</span><span class="special">()</span></code>.
+ Most of the lockers defined in Boost.Thread and Boost.Interprocess could
+ be cosidered as <code class="computeroutput"><span class="identifier">TryLockers</span></code>,
+ i.e. them initialize in this way when <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">try_to_lock</span></code>
+ is given as parameter.
+ </p>
+<p>
+ The following code shows one way to use the TryLocker:
+ </p>
+<pre class="programlisting"><span class="identifier">product</span> <span class="special">*</span><span class="identifier">product_queue</span><span class="special">::</span><span class="identifier">try_pull</span><span class="special">()</span> <span class="special">{</span>
+ <span class="identifier">product</span> <span class="special">*</span><span class="identifier">pulled</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">unique_lock</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mutex</span><span class="special">&gt;</span> <span class="identifier">locker</span><span class="special">(</span><span class="identifier">mtx</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">try_to_lock</span><span class="special">);</span>
+ <span class="keyword">if</span><span class="special">(</span><span class="identifier">locker</span> <span class="special">&amp;&amp;</span> <span class="special">!</span><span class="identifier">queue</span><span class="special">.</span><span class="identifier">empty</span><span class="special">())</span> <span class="special">{</span>
+ <span class="identifier">pulled</span> <span class="special">=</span> <span class="identifier">queue</span><span class="special">.</span><span class="identifier">front</span><span class="special">();</span>
+ <span class="identifier">queue</span><span class="special">.</span><span class="identifier">pop</span><span class="special">();</span>
+ <span class="special">}</span>
+ <span class="keyword">return</span> <span class="identifier">pulled</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ All of them use a safe strategy for a boolean conversion which use a member
+ pointer rather than a <code class="computeroutput"><span class="keyword">bool</span></code>,
+ which is typically too permissive:
+ </p>
+<pre class="programlisting"><span class="keyword">typedef</span> <span class="keyword">bool</span> <span class="identifier">try_locker</span><span class="special">::*</span><span class="identifier">is_locked</span><span class="special">;</span>
+<span class="keyword">operator</span> <span class="identifier">is_locked</span><span class="special">()</span> <span class="keyword">const</span> <span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">locked</span> <span class="special">?</span> <span class="special">&amp;</span><span class="identifier">try_locker</span><span class="special">::</span><span class="identifier">locked</span> <span class="special">:</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ If we use interprocess mutexes we need to replace the following line
+ </p>
+<pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">unique_lock</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mutex</span><span class="special">&gt;</span> <span class="identifier">scoped</span><span class="special">(</span><span class="identifier">guard</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">try_to_lock</span><span class="special">);</span>
+</pre>
+<p>
+ by
+ </p>
+<pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">interprocess</span><span class="special">::</span><span class="identifier">scoped_lock</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">interprocess</span><span class="special">::</span><span class="identifier">interprocess_mutex</span><span class="special">&gt;</span> <span class="identifier">scoped</span><span class="special">(</span><span class="identifier">guard</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">interprocess</span><span class="special">::</span><span class="identifier">try_to_lock</span><span class="special">);</span>
+</pre>
+<p>
+ There are other <code class="computeroutput"><span class="identifier">TryLockers</span></code>
+ in Boost.Thread defined as a member typedef <code class="computeroutput"><span class="identifier">scoped_try_lock</span></code>.
+ The semantics of each constructor and member function are identical to
+ those of <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">unique_lock</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;</span></code>
+ for the same Lockable, except that the constructor that takes a single
+ reference to a mutex will call <code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">try_lock</span><span class="special">()</span></code> rather than <code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">lock</span><span class="special">()</span></code>.
+ </p>
+<pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mutex</span><span class="special">::</span><span class="identifier">scoped_try_lock</span> <span class="identifier">locker</span><span class="special">(</span><span class="identifier">mtx</span><span class="special">);</span>
+</pre>
+<p>
+ The library defines in a generic way a try_unique_locker adapter which
+ takes care of naming differences and that can be used like
+ </p>
+<pre class="programlisting"><span class="identifier">bsynchro</span><span class="special">::</span><span class="identifier">unique_try_locker</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="identifier">locker</span><span class="special">(</span><span class="identifier">mtx</span><span class="special">);</span>
+</pre>
+<p>
+ for any model of Lockable.
+ </p>
+<p>
+ <span class="bold"><strong>Exception-based Timed Lockers</strong></span>
+ </p>
+<p>
+ In addition to supporting timeout exception for Lock, the library supports
+ them also for ExceptionBaseTimedLockers. The semantics of each constructor
+ and member function are identical to those of boost::unique_locker&lt;Lockable&gt;
+ for the same Lockable, except that the constructor that takes a time or
+ a duration as first parameter in a addition to the reference to a mutex
+ will call <code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">lock_until</span><span class="special">(</span><span class="identifier">t</span><span class="special">)</span></code> or
+ <code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">lock_for</span><span class="special">(</span><span class="identifier">d</span><span class="special">)</span></code> rather
+ than <code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">try_lock_until</span><span class="special">(</span><span class="identifier">t</span><span class="special">)</span></code> or
+ <code class="computeroutput"><span class="identifier">m</span><span class="special">.</span><span class="identifier">try_lock_for</span><span class="special">(</span><span class="identifier">d</span><span class="special">)</span></code> and
+ so a <code class="computeroutput"><span class="identifier">timeout_exception</span></code>
+ is possible on the constructor.
+ </p>
+<p>
+ Let me start with an example of an application needing to lock several
+ locks at the same time. Once all the locks are locked something must be
+ done. Otherwise the application do something else and reiterate the lock
+ requests. The natural and exception safe way to do that is
+ </p>
+<pre class="programlisting"><span class="keyword">while</span> <span class="special">(</span><span class="identifier">polling</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">t</span><span class="special">=</span><span class="identifier">now</span><span class="special">()+</span><span class="number">100</span><span class="special">;</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">unique_lock</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mutex</span><span class="special">&gt;</span> <span class="identifier">l1</span><span class="special">(</span><span class="identifier">m1</span><span class="special">,</span> <span class="identifier">t</span><span class="special">);</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">unique_lock</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mutex</span><span class="special">&gt;</span> <span class="identifier">l2</span><span class="special">(</span><span class="identifier">m2</span><span class="special">,</span> <span class="identifier">t</span><span class="special">);</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">unique_lock</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mutex</span><span class="special">&gt;</span> <span class="identifier">l3</span><span class="special">(</span><span class="identifier">m3</span><span class="special">,</span> <span class="identifier">t</span><span class="special">);</span>
+ <span class="keyword">if</span> <span class="special">(</span><span class="identifier">l1</span><span class="special">.</span><span class="identifier">has_lock</span><span class="special">()</span> <span class="special">&amp;&amp;</span> <span class="identifier">l2</span><span class="special">.</span><span class="identifier">has_lock</span><span class="special">()</span> <span class="special">&amp;&amp;</span> <span class="identifier">l3</span><span class="special">.</span><span class="identifier">has_lock</span><span class="special">()</span> <span class="special">{</span>
+ <span class="identifier">foo</span><span class="special">();</span>
+ <span class="identifier">polling</span> <span class="special">=</span> <span class="keyword">false</span><span class="special">;</span>
+ <span class="special">}</span> <span class="keyword">else</span> <span class="identifier">execute_on_failed</span><span class="special">();</span>
+<span class="special">}</span>
+</pre>
+<p>
+ The problem with this code is that it locks <code class="computeroutput"><span class="identifier">m2</span></code>
+ even if <code class="computeroutput"><span class="identifier">l1</span></code> do not owns
+ the lock <code class="computeroutput"><span class="identifier">m1</span></code>. The advertised
+ reader could argument that if the lock m1 has not been locked by a timeout,
+ as all share the same time constraint the failing lock of m2 will not be
+ expensive. Well the problem is that the locking of m1 can fail because
+ m1 is already locked. When we try to optimize this
+ </p>
+<pre class="programlisting"><span class="keyword">while</span> <span class="special">(</span><span class="identifier">polling</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">t</span><span class="special">=</span><span class="identifier">now</span><span class="special">()+</span><span class="number">100</span><span class="special">;</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">unique_lock</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mutex</span><span class="special">&gt;</span> <span class="identifier">l1</span><span class="special">(</span><span class="identifier">m1</span><span class="special">,</span> <span class="identifier">t</span><span class="special">);</span>
+ <span class="keyword">if</span> <span class="special">(</span><span class="identifier">l1</span><span class="special">.</span><span class="identifier">has_lock</span><span class="special">()</span> <span class="special">{</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">unique_lock</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mutex</span><span class="special">&gt;</span> <span class="identifier">l2</span><span class="special">(</span><span class="identifier">m2</span><span class="special">,</span> <span class="identifier">t</span><span class="special">);</span>
+ <span class="keyword">if</span> <span class="special">(</span><span class="identifier">l2</span><span class="special">.</span><span class="identifier">has_lock</span><span class="special">()</span> <span class="special">{</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">unique_lock</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mutex</span><span class="special">&gt;</span> <span class="identifier">l3</span><span class="special">(</span><span class="identifier">m3</span><span class="special">,</span> <span class="identifier">t</span><span class="special">);</span>
+ <span class="keyword">if</span> <span class="special">(</span><span class="identifier">l2</span><span class="special">.</span><span class="identifier">has_lock</span><span class="special">()</span> <span class="special">{</span>
+ <span class="identifier">foo</span><span class="special">();</span>
+ <span class="identifier">polling</span> <span class="special">=</span> <span class="keyword">false</span><span class="special">;</span>
+ <span class="special">}</span> <span class="keyword">else</span> <span class="identifier">execute_on_failed</span><span class="special">();</span>
+ <span class="special">}</span> <span class="keyword">else</span> <span class="identifier">execute_on_failed</span><span class="special">();</span>
+ <span class="special">}</span> <span class="keyword">else</span> <span class="identifier">execute_on_failed</span><span class="special">();</span>
+<span class="special">}</span>
+</pre>
+<p>
+ we found that this starts to be unmaintenable. What is event wrost is that
+ as the preceding one is subject to deadlock if another thread acquire the
+ locks in a different order.
+ </p>
+<p>
+ <span class="bold"><strong>try_lock_until and try_lock_for free functions</strong></span>
+ </p>
+<p>
+ To avoid this we can request the acquisition of all the locks toghether
+ (letting the function to try several orders), as it does the function try_lock
+ of Boost.Threads, but adding this time a expiration period parameter
+ </p>
+<pre class="programlisting"><span class="keyword">while</span> <span class="special">(</span><span class="identifier">polling</span><span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">if</span> <span class="special">(</span><span class="identifier">bsynchro</span><span class="special">::</span><span class="identifier">try_lock_for</span><span class="special">(</span><span class="number">100</span><span class="special">,</span> <span class="identifier">m1</span><span class="special">,</span> <span class="identifier">m2</span><span class="special">,</span> <span class="identifier">m3</span><span class="special">))</span> <span class="special">{</span>
+ <span class="identifier">foo</span><span class="special">();</span>
+ <span class="identifier">polling</span> <span class="special">=</span> <span class="keyword">false</span><span class="special">;</span>
+ <span class="special">}</span> <span class="keyword">else</span> <span class="identifier">execute_on_failed</span><span class="special">();</span>
+<span class="special">}</span>
+</pre>
+<p>
+ While this solve the deadlock problem, this code is not exception safe.
+ With exception based lockers we can do the following (note that the time
+ is given as first aregument to the locker constructor)
+ </p>
+<pre class="programlisting"><span class="keyword">while</span> <span class="special">(</span><span class="identifier">polling</span><span class="special">)</span>
+ <span class="keyword">try</span> <span class="special">{</span>
+ <span class="identifier">t</span><span class="special">=</span><span class="identifier">now</span><span class="special">()+</span><span class="number">100</span><span class="special">;</span>
+ <span class="identifier">bsynchro</span><span class="special">::</span><span class="identifier">unique_locker</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mutex</span><span class="special">&gt;</span> <span class="identifier">l1</span><span class="special">(</span><span class="identifier">t</span><span class="special">,</span> <span class="identifier">m1</span><span class="special">);</span>
+ <span class="identifier">bsynchro</span><span class="special">::</span><span class="identifier">unique_locker</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mutex</span><span class="special">&gt;</span> <span class="identifier">l2</span><span class="special">(</span><span class="identifier">t</span><span class="special">,</span> <span class="identifier">m2</span><span class="special">);</span>
+ <span class="identifier">bsynchro</span><span class="special">::</span><span class="identifier">unique_locker</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mutex</span><span class="special">&gt;</span> <span class="identifier">l3</span><span class="special">(</span><span class="identifier">t</span><span class="special">,</span> <span class="identifier">m3</span><span class="special">);</span>
+ <span class="identifier">foo</span><span class="special">();</span>
+ <span class="identifier">polling</span> <span class="special">=</span> <span class="keyword">false</span><span class="special">;</span>
+ <span class="special">}</span> <span class="keyword">catch</span> <span class="special">(</span><span class="identifier">bsynchro</span><span class="special">::</span><span class="identifier">timeout_exception</span><span class="special">&amp;</span> <span class="identifier">ex</span><span class="special">)</span> <span class="special">{</span><span class="identifier">execute_on_failed</span><span class="special">();</span> <span class="special">}</span>
+</pre>
+<p>
+ <span class="bold"><strong><code class="computeroutput"><span class="identifier">locker_tuples</span></code>
+ or <code class="computeroutput"><span class="identifier">locker_array</span></code> of Locker
+ containers</strong></span>
+ </p>
+<p>
+ While this code is exception safe and do not locks <code class="computeroutput"><span class="identifier">m2</span></code>
+ if <code class="computeroutput"><span class="identifier">m1</span></code> is not acquired,
+ it is subject to deadlock. We can go a step ahead and mix the advantage
+ of taking all the locks at once and making the acquisition block scoped.
+ In order to do that we need either a array_locker or a tuple_locker depending
+ on whether the locks are homogeneus or not. The library provides both of
+ them. These locker containers follows the same rules as the element wise
+ lockers. If the time comes after the locks no exception is thrown on timeout
+ and if given as the first parameter a exception will be thown when the
+ time will expire.
+ </p>
+<p>
+ So the preceding code becomes without timeout exceptions
+ </p>
+<pre class="programlisting"><span class="keyword">while</span> <span class="special">(</span><span class="identifier">polling</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">bsynchro</span><span class="special">::</span><span class="identifier">array_unique_locker</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mutex</span><span class="special">,</span> <span class="number">3</span><span class="special">&gt;</span> <span class="identifier">lk</span><span class="special">(</span><span class="identifier">m1</span><span class="special">,</span> <span class="identifier">m2</span><span class="special">,</span> <span class="identifier">m3</span><span class="special">,</span> <span class="number">100</span><span class="special">);</span>
+ <span class="keyword">if</span> <span class="special">(</span><span class="identifier">lk</span><span class="special">.</span><span class="identifier">owns_lock</span><span class="special">())</span> <span class="special">{</span>
+ <span class="identifier">foo</span><span class="special">();</span>
+ <span class="identifier">polling</span> <span class="special">=</span> <span class="keyword">false</span><span class="special">;</span>
+ <span class="special">}</span> <span class="keyword">else</span> <span class="identifier">execute_on_failed</span><span class="special">();</span>
+<span class="special">}</span>
+</pre>
+<p>
+ which is exception safe or with exception based timed locks (Note that
+ the time is given before the locks)
+ </p>
+<pre class="programlisting"><span class="keyword">while</span> <span class="special">(</span><span class="identifier">polling</span><span class="special">)</span>
+<span class="keyword">try</span> <span class="special">{</span> <span class="identifier">bsynchro</span><span class="special">::</span><span class="identifier">array_locker</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mutex</span><span class="special">,</span> <span class="number">3</span><span class="special">&gt;</span> <span class="identifier">lk</span><span class="special">(</span><span class="number">100</span><span class="special">,</span> <span class="identifier">m1</span><span class="special">,</span> <span class="identifier">m2</span><span class="special">,</span> <span class="identifier">m3</span><span class="special">);</span>
+ <span class="identifier">foo</span><span class="special">();</span>
+ <span class="identifier">polling</span> <span class="special">=</span> <span class="keyword">false</span><span class="special">;</span>
+<span class="special">}</span> <span class="keyword">catch</span> <span class="special">(</span><span class="identifier">bsynchro</span><span class="special">::</span><span class="identifier">timeout_exception</span><span class="special">&amp;</span> <span class="identifier">ex</span><span class="special">)</span> <span class="special">{</span> <span class="identifier">execute_on_failed</span><span class="special">();</span> <span class="special">}</span>
+</pre>
+<p>
+ When the Locks locked by an <code class="computeroutput"><span class="identifier">array_unique_locker</span></code>
+ are not homogeneus we need some kind of tuple.
+ </p>
+<pre class="programlisting"><span class="keyword">while</span> <span class="special">(</span><span class="identifier">polling</span><span class="special">)</span>
+<span class="keyword">try</span> <span class="special">{</span> <span class="identifier">bsynchro</span><span class="special">::</span><span class="identifier">tuple_unique_locker</span><span class="special">&lt;</span><span class="identifier">T1</span><span class="special">,</span> <span class="identifier">T2</span><span class="special">,</span> <span class="identifier">T1</span><span class="special">&gt;</span> <span class="identifier">lk</span><span class="special">(</span><span class="number">100</span><span class="special">,</span> <span class="identifier">m1</span><span class="special">,</span> <span class="identifier">m2</span><span class="special">,</span> <span class="identifier">m3</span><span class="special">);</span>
+ <span class="identifier">foo</span><span class="special">();</span>
+ <span class="identifier">polling</span> <span class="special">=</span> <span class="keyword">false</span><span class="special">;</span>
+<span class="special">}</span> <span class="keyword">catch</span> <span class="special">(</span><span class="identifier">bsynchro</span><span class="special">::</span><span class="identifier">timed_exception</span><span class="special">&amp;</span> <span class="identifier">ex</span><span class="special">)</span> <span class="special">{</span> <span class="identifier">execute_on_failed</span><span class="special">();</span> <span class="special">}</span>
+</pre>
+<p>
+ <span class="bold"><strong><code class="computeroutput"><span class="identifier">lock_until</span></code>
+ and <code class="computeroutput"><span class="identifier">lock_for</span></code> free functions</strong></span>
+ </p>
+<p>
+ For completion the exception based timed multi lock functions <code class="computeroutput"><span class="identifier">unlock</span></code>, <code class="computeroutput"><span class="identifier">lock_until</span></code>
+ and <code class="computeroutput"><span class="identifier">lock_for</span></code> are also provided.
+ </p>
+<pre class="programlisting"><span class="keyword">while</span> <span class="special">(</span><span class="identifier">polling</span><span class="special">)</span>
+ <span class="keyword">try</span> <span class="special">{</span>
+ <span class="identifier">bsynchro</span><span class="special">::</span><span class="identifier">lock_for</span><span class="special">(</span><span class="number">100</span><span class="special">,</span> <span class="identifier">m1</span><span class="special">,</span> <span class="identifier">m2</span><span class="special">,</span> <span class="identifier">m3</span><span class="special">);</span>
+ <span class="identifier">foo</span><span class="special">();</span>
+ <span class="identifier">polling</span> <span class="special">=</span> <span class="keyword">false</span><span class="special">;</span>
+ <span class="special">}</span> <span class="keyword">catch</span> <span class="special">(</span><span class="identifier">bsynchro</span><span class="special">::</span><span class="identifier">timeout_exception</span><span class="special">&amp;</span> <span class="identifier">ex</span><span class="special">)</span> <span class="special">{</span><span class="identifier">execute_on_failed</span><span class="special">();</span> <span class="special">}</span>
+</pre>
+<p>
+ <span class="bold"><strong>External lockers</strong></span>
+ </p>
+<p>
+ An alternative or complementary approach to internal locking is to support
+ external locking for an object - Multiple calls may be grouped within the
+ same externally defined critical region.
+ </p>
+<p>
+ External locking has some associated risks for high-level objects. Incorrect
+ usage can be too easy: a forgotten call to lock or unlock is more likely
+ than with synchronisation primitives because the focus of using the object
+ is on the rest of its non-Lockable interface, so it becomes easy to forget
+ that to use the interface correctly also requires participation in a locking
+ scheme.
+ </p>
+<p>
+ To some extent lockers can help, but such a co-operative scheme should
+ only be employed when internal locking is too restricted for a given use,
+ e.g. multiple operations must be performed together. Ideally, if such operations
+ are common they should be defined internally locked and defined in the
+ interface of the object as Combined Methods.
+ </p>
+<p>
+ Assuming that locks are re-entrant, external locking can be provided to
+ complement the more encapsulated internal locking, i.e. by default if you
+ want to call a single function you just call it and it automatically locks,
+ but if you want to call multiple functions together you first apply an
+ external lock.
+ </p>
+<p>
+ The library provides a <code class="computeroutput"><span class="identifier">externally_locked</span></code>
+ class that allows to access a externally locked class in a thread safe
+ mode through strict lockers.
+ </p>
+<p>
+ Where only external locking is used, a safe approach is needed for calling
+ single functions easily. The library provides two classes
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<code class="computeroutput"><span class="identifier">locking_ptr</span></code> and
+ </li>
+<li><code class="computeroutput"><span class="identifier">on_dereference_locking_ptr</span></code></li>
+<li><code class="computeroutput"><span class="identifier">externally_locked</span></code></li>
+</ul></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.overview.intro.poly"></a> Polymorphic lockable
+</h4></div></div></div>
+<p>
+ The locks classes introduced previously are a non-polymorphic classes.
+ Clearly, many of the synchronisation primitives support common operations,
+ and hence interfaces. In some cases a more general interface is useful.
+ </p>
+<p>
+ The synchronised interface class may be used explicitly as a base class
+ for a class supporting synchronisation.
+ </p>
+<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">exclusive_lock</span> <span class="special">{</span>
+ <span class="keyword">virtual</span> <span class="special">~</span><span class="identifier">exclusive_lock</span><span class="special">()=</span><span class="number">0</span><span class="special">;</span>
+ <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">lock</span><span class="special">()=</span><span class="number">0</span><span class="special">;</span>
+ <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">unlock</span><span class="special">()=</span><span class="number">0</span><span class="special">;</span>
+ <span class="keyword">virtual</span> <span class="keyword">bool</span> <span class="identifier">try_lock</span><span class="special">()=</span><span class="number">0</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+<p>
+ More usefully for primitives, which are best left as non-polymorphic, an
+ adaptor class is used to provide the interface -- run-time polymorphism
+ -- on behalf of anything supporting the correctly named functions - compile
+ time polymorphism. It easier to take a nonpolymorphic class and adapt it
+ to be polymorphic, than it is do it the other way around: the overhead
+ and semantics of polymorphism can only be introduced to a class, not removed.
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">exclusive_lock_adapter</span> <span class="special">:</span> <span class="keyword">public</span> <span class="keyword">virtual</span> <span class="identifier">exclusive_lock</span>
+<span class="special">{</span>
+ <span class="identifier">exclusive_lock_adapter</span><span class="special">():</span> <span class="identifier">lock_</span><span class="special">()</span> <span class="special">{}</span>
+ <span class="keyword">virtual</span> <span class="special">~</span><span class="identifier">exclusive_lock_adapter</span><span class="special">()</span> <span class="special">{}</span>
+
+ <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">lock</span><span class="special">()</span> <span class="special">{</span><span class="identifier">lock_</span><span class="special">.</span><span class="identifier">lock</span><span class="special">();}</span>
+ <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">unlock</span><span class="special">()</span> <span class="special">{</span><span class="identifier">lock_</span><span class="special">.</span><span class="identifier">unlock</span><span class="special">();}</span>
+ <span class="keyword">virtual</span> <span class="keyword">bool</span> <span class="identifier">try_lock</span><span class="special">()</span> <span class="special">{</span> <span class="keyword">return</span> <span class="identifier">lock_</span><span class="special">.</span><span class="identifier">try_lock</span><span class="special">();}</span>
+<span class="keyword">protected</span><span class="special">:</span>
+ <span class="identifier">Lockable</span> <span class="identifier">lock_</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.overview.intro.language_like_synchronized_block_"></a><a href="intro.html#boost_synchro.overview.intro.language_like_synchronized_block_" title="Language-like
+ Synchronized Block ">Language-like
+ Synchronized Block </a>
+</h4></div></div></div>
+<p>
+ Nest follows an example of mutual exclusion with automatic objects.
+ </p>
+<pre class="programlisting"><span class="special">{</span>
+ <span class="identifier">scoped_guard</span><span class="special">&lt;</span><span class="identifier">boost_mutex</span><span class="special">&gt;</span> <span class="identifier">lock</span><span class="special">(</span><span class="identifier">l</span><span class="special">);</span>
+ <span class="identifier">foo</span><span class="special">();</span>
+ <span class="keyword">return</span> <span class="identifier">bar</span><span class="special">();</span> <span class="comment">// lock released
+</span><span class="special">}</span>
+</pre>
+<p>
+ With language-like mutual exclusion this results in:
+ </p>
+<pre class="programlisting"><span class="identifier">synchronize</span><span class="special">(</span><span class="identifier">l</span><span class="special">)</span>
+<span class="special">{</span>
+ <span class="identifier">foo</span><span class="special">();</span>
+ <span class="keyword">return</span> <span class="identifier">bar</span><span class="special">();</span>
+<span class="special">}</span> <span class="comment">// lock released
+</span></pre>
+<p>
+ This is achieved through macros. If the user wants to use synchronized
+ this way he needs to include a specific file which defines
+ </p>
+<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">synchronized</span><span class="special">(</span><span class="identifier">MUTEX</span><span class="special">)</span> <span class="identifier">BOOST_SYNCHRONIZED</span><span class="special">(</span><span class="identifier">MUTEX</span><span class="special">)</span>
+</pre>
+<p>
+ The library do not provides this directly because this can broke some user
+ code. The library provideds other safer macros, using the BOOST prefix.
+ </p>
+<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">BOOST_SYNCHRONIZED_VAR</span><span class="special">(</span><span class="identifier">VARS_DECLARATION</span><span class="special">)</span> <span class="special">\</span>
+ <span class="keyword">if</span> <span class="special">(</span><span class="keyword">bool</span> <span class="identifier">stop_</span> <span class="special">=</span> <span class="keyword">false</span><span class="special">)</span> <span class="special">{}</span> <span class="keyword">else</span> <span class="special">\</span>
+ <span class="keyword">for</span> <span class="special">(</span><span class="identifier">VARS_DECLARATION</span><span class="special">;</span> <span class="special">!</span><span class="identifier">stop_</span><span class="special">;</span> <span class="identifier">stop_</span> <span class="special">=</span> <span class="keyword">true</span><span class="special">)</span>
+
+<span class="preprocessor">#define</span> <span class="identifier">BOOST_SYNCHRONIZED</span><span class="special">(</span><span class="identifier">MUTEX</span><span class="special">)</span> <span class="special">\</span>
+ <span class="identifier">BOOST_SYNCHRONIZED_VAR</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">scoped_guard</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mutex</span><span class="special">&gt;</span> <span class="identifier">__lock</span><span class="special">(</span><span class="identifier">MUTEX</span><span class="special">))</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.overview.intro.monitors"></a> Monitors
+</h4></div></div></div>
+<p>
+ Concurrent components may interact in different ways: they may access the
+ same objects by, for example, executing functions of these objects; or
+ they may communicate directly by executing functions of each other.
+ </p>
+<p>
+ Concurrent execution of objects requires a mechanism for synchronizing
+ the access to shared objects, just as direct communication between objects
+ may require synchronization. The basic mechanism for synchronization in
+ Boost.Threads and Boost.Interprocess are the well known mutex and condition_variables.
+ Mutexes and condition variables are, however, only useful for very simple
+ synchronization problems. The Synchro Library therefore introduce high-level
+ abstractions for handling more complicated synchronization problems, including
+ monitor for guaranteeing exclusive access to an object.
+ </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">Copyright © 2008 Vicente J. Botet Escriba<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../overview.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../overview.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../users_guide.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/synchro/libs/synchro/doc/html/boost_synchro/reference.html
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/html/boost_synchro/reference.html 2009-10-12 17:49:35 EDT (Mon, 12 Oct 2009)
@@ -0,0 +1,200 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Reference</title>
+<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+<link rel="start" href="../index.html" title="Chapter 1. Boost.Synchro">
+<link rel="up" href="../index.html" title="Chapter 1. Boost.Synchro">
+<link rel="prev" href="users_guide/glosary.html" title=" Glossary">
+<link rel="next" href="reference/lockables.html" title="Lockables">
+</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">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="users_guide/glosary.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="reference/lockables.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="boost_synchro.reference"></a>Reference
+</h2></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section">Lockables</span></dt>
+<dd><dl>
+<dt><span class="section"><a href="reference/lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">lockable_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference/lockables.html#boost_synchro.reference.lockables.lockable_concept_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">lockable_concepts</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference/lockables.html#boost_synchro.reference.lockables.lock_generator_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">lock_generator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference/lockables.html#boost_synchro.reference.lockables.lockable_adapter_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">lockable_adapter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="reference/generic_free_functions_on_lockable.html">Generic
+ Free Functions on Lockable</a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="reference/generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.lock_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">lock</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference/generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.unlock_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">unlock</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference/generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.try_lock_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">try_lock</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference/generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.try_lock_until_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">try_lock_until</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference/generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.try_lock_for_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">try_lock_for</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference/generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.lock_until_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">lock_until</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference/generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.lock_for_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">lock_for</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference/generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.lock_shared_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">lock_shared</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference/generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.unlock_shared_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">unlock_shared</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference/generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.try_lock_shared_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">try_lock_shared</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference/generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.try_lock_shared_for_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">try_lock_shared_for</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference/generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.lock_shared_until_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">lock_shared_until</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference/generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.lock_shared_for_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">lock_shared_for</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference/generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.lock_upgrade_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">lock_upgrade</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference/generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.unlock_upgrade_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">unlock_upgrade</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference/generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.try_lock_upgrade_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">try_lock_upgrade</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference/generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.try_lock_upgrade_until_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">try_lock_upgrade_until</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference/generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.lock_upgrade_until_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">lock_upgrade_until</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference/generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.lock_upgrade_for_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">lock_upgrade_for</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference/generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.unlock_and_lock_upgrade_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">unlock_and_lock_upgrade</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference/generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.unlock_and_lock_shared_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">unlock_and_lock_shared</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference/generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.unlock_upgrade_and_lock_shared_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">unlock_upgrade_and_lock_shared</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference/generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.unlock_upgrade_and_lock_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">unlock_upgrade_and_lock</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference/generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.unlock_upgrade_and_lock_until_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">unlock_upgrade_and_lock_until</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference/generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.unlock_upgrade_and_lock_for_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">unlock_upgrade_and_lock_for</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference/generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.try_unlock_upgrade_and_lock_until_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">try_unlock_upgrade_and_lock_until</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference/generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.try_unlock_upgrade_and_lock_for_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">try_unlock_upgrade_and_lock_for</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference/generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.unlock_shared_and_lock_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">unlock_shared_and_lock</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference/generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.try_unlock_shared_and_lock_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">try_unlock_shared_and_lock_hpp</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference/generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.try_unlock_shared_and_lock_upgrade_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">try_unlock_shared_and_lock_upgrade</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="reference/generic_free_functions_on_multiple_lockables.html">Generic
+ Free Functions on Multiple Lockables</a></span></dt>
+<dt><span class="section"><a href="reference/condition_lockables.html">Condition
+ Lockables</a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="reference/condition_lockables.html#boost_synchro.reference.condition_lockables.condition_safe_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">locker</span><span class="special">/</span><span class="identifier">condition_safe</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference/condition_lockables.html#boost_synchro.reference.condition_lockables.condition_backdoor_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">condition_backdoor</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference/condition_lockables.html#boost_synchro.reference.condition_lockables.condition_lockable_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">condition_lockable</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+</dl></dd>
+<dt><span class="section">Lockers</span></dt>
+<dd><dl>
+<dt><span class="section"><a href="reference/lockers.html#boost_synchro.reference.lockers.locker_concepts_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">locker_concepts</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference/lockers.html#boost_synchro.reference.lockers.is_strict_locker_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">locker</span><span class="special">/</span><span class="identifier">is_strict_locker</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference/lockers.html#boost_synchro.reference.lockers.strict_locker_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">locker</span><span class="special">/</span><span class="identifier">strict_locker</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference/lockers.html#boost_synchro.reference.lockers.reverse_locker_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">locker</span><span class="special">/</span><span class="identifier">reverse_locker</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference/lockers.html#boost_synchro.reference.lockers.nested_reverse_locker_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">locker</span><span class="special">/</span><span class="identifier">nested_reverse_locker</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference/lockers.html#boost_synchro.reference.lockers.condition_locker_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">locker</span><span class="special">/</span><span class="identifier">condition_locker</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference/lockers.html#boost_synchro.reference.lockers.externally_locked_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">locker</span><span class="special">/</span><span class="identifier">externally_locked</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference/lockers.html#boost_synchro.reference.lockers.locking_ptr_hpp"> Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">locker</span><span class="special">/</span><span class="identifier">locking_ptr</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference/lockers.html#boost_synchro.reference.lockers.on_derreference_locking_ptr_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">locker</span><span class="special">/</span><span class="identifier">on_derreference_locking_ptr</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference/lockers.html#boost_synchro.reference.lockers.array_unique_locker_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">locker</span><span class="special">/</span><span class="identifier">array_unique_locker</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+</dl></dd>
+<dt><span class="section">Single-threaded</span></dt>
+<dd><dl>
+<dt><span class="section"><a href="reference/single_threaded.html#boost_synchro.reference.single_threaded.null_mutex_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">null_mutex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference/single_threaded.html#boost_synchro.reference.single_threaded.null_condition_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">null_condition</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference/single_threaded.html#boost_synchro.reference.single_threaded.null_synchronization_family_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">null_synchronization_family</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+</dl></dd>
+<dt><span class="section">Multi-threaded</span></dt>
+<dd><dl>
+<dt><span class="section"><a href="reference/multi_threaded.html#boost_synchro.reference.multi_threaded.thread_lockable_scope_traits_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">thread</span><span class="special">/</span><span class="identifier">lockable_scope_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference/multi_threaded.html#boost_synchro.reference.multi_threaded.thread_mutex_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">thread</span><span class="special">/</span><span class="identifier">mutex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference/multi_threaded.html#boost_synchro.reference.multi_threaded.thread_recursive_mutex_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">thread_recursive_mutex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference/multi_threaded.html#boost_synchro.reference.multi_threaded.thread_shared_mutex_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">thread</span><span class="special">/</span><span class="identifier">shared_mutex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference/multi_threaded.html#boost_synchro.reference.multi_threaded.thread_locks_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">thread</span><span class="special">/</span><span class="identifier">locks</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference/multi_threaded.html#boost_synchro.reference.multi_threaded.thread_synchronization_family_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">thread_synchronization_family</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+</dl></dd>
+<dt><span class="section">Multi-process</span></dt>
+<dd><dl>
+<dt><span class="section"><a href="reference/multi_process.html#boost_synchro.reference.multi_process.thread_lockable_scope_traits_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">thread</span><span class="special">/</span><span class="identifier">lockable_scope_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference/multi_process.html#boost_synchro.reference.multi_process.process_synchronization_family_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">process_synchronization_family</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="reference/polymorphic_locks.html">Polymorphic
+ Locks</a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="reference/polymorphic_locks.html#boost_synchro.reference.polymorphic_locks.poly_lock_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">poly</span><span class="special">/</span><span class="identifier">lock</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference/polymorphic_locks.html#boost_synchro.reference.polymorphic_locks.poly_lock_adpater_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">poly</span><span class="special">/</span><span class="identifier">lock_adpater</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+</dl></dd>
+<dt><span class="section">Other</span></dt>
+<dd><dl><dt><span class="section"><a href="reference/other.html#boost_synchro.reference.other.semaphore_hpp"> Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">semaphore</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt></dl></dd>
+<dt><span class="section">High Level</span></dt>
+<dd><dl><dt><span class="section"><a href="reference/high_level.html#boost_synchro.reference.high_level.monitor_hpp"> Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">monitor</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt></dl></dd>
+</dl></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">Copyright © 2008 Vicente J. Botet Escriba<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="users_guide/glosary.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="reference/lockables.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/synchro/libs/synchro/doc/html/boost_synchro/reference/condition_lockables.html
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/html/boost_synchro/reference/condition_lockables.html 2009-10-12 17:49:35 EDT (Mon, 12 Oct 2009)
@@ -0,0 +1,205 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Condition
+ Lockables</title>
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+<link rel="start" href="../../index.html" title="Chapter 1. Boost.Synchro">
+<link rel="up" href="../reference.html" title="Reference">
+<link rel="prev" href="generic_free_functions_on_multiple_lockables.html" title="Generic
+ Free Functions on Multiple Lockables">
+<link rel="next" href="lockers.html" title="Lockers">
+</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">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="generic_free_functions_on_multiple_lockables.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="lockers.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_synchro.reference.condition_lockables"></a><a href="condition_lockables.html" title="Condition
+ Lockables">Condition
+ Lockables</a>
+</h3></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="condition_lockables.html#boost_synchro.reference.condition_lockables.condition_safe_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">locker</span><span class="special">/</span><span class="identifier">condition_safe</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dd><dl><dt><span class="section"><a href="condition_lockables.html#boost_synchro.reference.condition_lockables.condition_safe_hpp.template_class__condition_safe_">Template
+ Class <code class="computeroutput"><span class="identifier">condition_safe</span></code></a></span></dt></dl></dd>
+<dt><span class="section"><a href="condition_lockables.html#boost_synchro.reference.condition_lockables.condition_backdoor_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">condition_backdoor</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dd><dl><dt><span class="section"><a href="condition_lockables.html#boost_synchro.reference.condition_lockables.condition_backdoor_hpp.template_class__condition_backdoor_">Template
+ Class <code class="computeroutput"><span class="identifier">condition_backdoor</span></code></a></span></dt></dl></dd>
+<dt><span class="section"><a href="condition_lockables.html#boost_synchro.reference.condition_lockables.condition_lockable_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">condition_lockable</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dd><dl><dt><span class="section"><a href="condition_lockables.html#boost_synchro.reference.condition_lockables.condition_lockable_hpp.template_class__condition_lockable_">Template
+ Class <code class="computeroutput"><span class="identifier">condition_lockable</span></code></a></span></dt></dl></dd>
+</dl></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.condition_lockables.condition_safe_hpp"></a><a href="condition_lockables.html#boost_synchro.reference.condition_lockables.condition_safe_hpp" title="
+ Header &lt;boost/synchro/locker/condition_safe.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">locker</span><span class="special">/</span><span class="identifier">condition_safe</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl><dt><span class="section"><a href="condition_lockables.html#boost_synchro.reference.condition_lockables.condition_safe_hpp.template_class__condition_safe_">Template
+ Class <code class="computeroutput"><span class="identifier">condition_safe</span></code></a></span></dt></dl></div>
+<p>
+ Wraps a condition variable in order make public only the safe functions,
+ and let the others accesible via a backdoor.
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Condition</span><span class="special">&gt;</span> <span class="keyword">class</span> <span class="identifier">condition_safe</span><span class="special">;</span>
+</pre>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.condition_lockables.condition_safe_hpp.template_class__condition_safe_"></a><a href="condition_lockables.html#boost_synchro.reference.condition_lockables.condition_safe_hpp.template_class__condition_safe_" title="Template
+ Class condition_safe">Template
+ Class <code class="computeroutput"><span class="identifier">condition_safe</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Condition</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">condition_safe</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">Condition</span> <span class="identifier">condition</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">condition_backdoor</span><span class="special">&lt;</span><span class="identifier">Condition</span><span class="special">&gt;</span> <span class="identifier">backdoor</span><span class="special">;</span>
+ <span class="keyword">void</span> <span class="identifier">notify_one</span><span class="special">();</span>
+ <span class="keyword">void</span> <span class="identifier">notify_all</span><span class="special">();</span>
+<span class="special">};</span>
+</pre>
+</div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.condition_lockables.condition_backdoor_hpp"></a><a href="condition_lockables.html#boost_synchro.reference.condition_lockables.condition_backdoor_hpp" title="
+ Header &lt;boost/synchro/condition_backdoor.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">condition_backdoor</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl><dt><span class="section"><a href="condition_lockables.html#boost_synchro.reference.condition_lockables.condition_backdoor_hpp.template_class__condition_backdoor_">Template
+ Class <code class="computeroutput"><span class="identifier">condition_backdoor</span></code></a></span></dt></dl></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Condition</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">condition_backdoor</span><span class="special">;</span>
+</pre>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.condition_lockables.condition_backdoor_hpp.template_class__condition_backdoor_"></a><a href="condition_lockables.html#boost_synchro.reference.condition_lockables.condition_backdoor_hpp.template_class__condition_backdoor_" title="Template
+ Class condition_backdoor">Template
+ Class <code class="computeroutput"><span class="identifier">condition_backdoor</span></code></a>
+</h5></div></div></div>
+<p>
+ Condition Backdoor template. Used by safe lockers as condition_locker.
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Condition</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">condition_backdoor</span> <span class="special">{</span>
+ <span class="identifier">condition_backdoor</span><span class="special">(</span><span class="identifier">condition_safe</span><span class="special">&lt;</span><span class="identifier">Condition</span><span class="special">&gt;&amp;</span><span class="identifier">cnd</span><span class="special">);</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Locker</span><span class="special">&gt;</span>
+ <span class="keyword">void</span> <span class="identifier">wait</span><span class="special">(</span><span class="identifier">Locker</span><span class="special">&amp;</span> <span class="identifier">lock</span><span class="special">);</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Locker</span><span class="special">&gt;</span>
+ <span class="keyword">bool</span> <span class="identifier">wait_until</span><span class="special">(</span><span class="identifier">Locker</span><span class="special">&amp;</span> <span class="identifier">lock</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">system_time</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">abs_time</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Locker</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">duration_type</span><span class="special">&gt;</span>
+ <span class="keyword">bool</span> <span class="identifier">wait_for</span><span class="special">(</span><span class="identifier">Locker</span><span class="special">&amp;</span> <span class="identifier">lock</span><span class="special">,</span> <span class="identifier">duration_type</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">rel_time</span><span class="special">);</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Locker</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Predicate</span><span class="special">&gt;</span>
+ <span class="keyword">void</span> <span class="identifier">wait_when</span><span class="special">(</span><span class="identifier">Locker</span><span class="special">&amp;</span> <span class="identifier">lock</span><span class="special">,</span> <span class="identifier">Predicate</span> <span class="identifier">pred</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Locker</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">predicate_type</span><span class="special">&gt;</span>
+ <span class="keyword">bool</span> <span class="identifier">wait_when_until</span><span class="special">(</span><span class="identifier">Locker</span><span class="special">&amp;</span> <span class="identifier">lock</span><span class="special">,</span> <span class="identifier">predicate_type</span> <span class="identifier">pred</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">system_time</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">abs_time</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Locker</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">predicate_type</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">duration_type</span><span class="special">&gt;</span>
+ <span class="keyword">bool</span> <span class="identifier">wait_when_for</span><span class="special">(</span><span class="identifier">Locker</span><span class="special">&amp;</span> <span class="identifier">lock</span><span class="special">,</span> <span class="identifier">predicate_type</span> <span class="identifier">pred</span><span class="special">,</span> <span class="identifier">duration_type</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">rel_time</span><span class="special">);</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Locker</span><span class="special">&gt;</span>
+ <span class="keyword">void</span> <span class="identifier">notify_one</span><span class="special">(</span><span class="identifier">Locker</span><span class="special">&amp;</span> <span class="identifier">lock</span><span class="special">);</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Locker</span><span class="special">&gt;</span>
+ <span class="keyword">void</span> <span class="identifier">notify_all</span><span class="special">(</span><span class="identifier">Locker</span><span class="special">&amp;</span> <span class="identifier">lock</span><span class="special">);</span>
+<span class="special">};</span>
+</pre>
+</div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.condition_lockables.condition_lockable_hpp"></a><a href="condition_lockables.html#boost_synchro.reference.condition_lockables.condition_lockable_hpp" title="
+ Header &lt;boost/synchro/condition_lockable.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">condition_lockable</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl><dt><span class="section"><a href="condition_lockables.html#boost_synchro.reference.condition_lockables.condition_lockable_hpp.template_class__condition_lockable_">Template
+ Class <code class="computeroutput"><span class="identifier">condition_lockable</span></code></a></span></dt></dl></div>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">synchro</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Condition</span><span class="special">&gt;</span>
+ <span class="keyword">class</span> <span class="identifier">condition_lockable</span>
+ <span class="keyword">typedef</span> <span class="identifier">condition_lockable</span><span class="special">&lt;</span><span class="identifier">thread_mutex</span><span class="special">&gt;</span> <span class="identifier">thread_condition_mutex</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">condition_lockable</span><span class="special">&lt;</span><span class="identifier">interprocess_mutex</span><span class="special">&gt;</span> <span class="identifier">interprocess_condition_mutex</span><span class="special">;</span>
+<span class="special">}}</span>
+</pre>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.condition_lockables.condition_lockable_hpp.template_class__condition_lockable_"></a><a href="condition_lockables.html#boost_synchro.reference.condition_lockables.condition_lockable_hpp.template_class__condition_lockable_" title="Template
+ Class condition_lockable">Template
+ Class <code class="computeroutput"><span class="identifier">condition_lockable</span></code></a>
+</h5></div></div></div>
+<p>
+ Allows a condition variable to be associated with a Lockable. Treating
+ condition locking as a property of Lockable rather than viceversa has
+ the benefit of making clear how something is locked and accessed, as
+ it were emphasising it in the first person.
+ </p>
+<p>
+ Requiring the user of a condition variable to implement a while loop
+ to verify a condition's predicate is potentially error prone. It can
+ be better encapsulated by passing the predicate as a function object
+ to the locking function.
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">=</span><span class="identifier">thread_mutex</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">Condition</span><span class="special">=</span><span class="identifier">condition_safe</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">best_condition</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="special">&gt;</span>
+<span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">condition_lockable</span> <span class="special">{</span>
+ <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">Lockable</span> <span class="special">{</span>
+ <span class="identifier">BOOST_CONCEPT_ASSERT</span><span class="special">((</span><span class="identifier">LockableConcept</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;));</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">Lockable</span> <span class="identifier">lockable_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">Condition</span> <span class="identifier">condition</span><span class="special">;</span>
+
+ <span class="identifier">condition_lockable</span><span class="special">();</span>
+ <span class="special">~</span><span class="identifier">condition_lockable</span><span class="special">();</span>
+
+ <span class="keyword">void</span> <span class="identifier">relock_on</span><span class="special">(</span><span class="identifier">condition</span> <span class="special">&amp;</span> <span class="identifier">cond</span><span class="special">);</span>
+ <span class="keyword">void</span> <span class="identifier">relock_on_until</span><span class="special">(</span><span class="identifier">condition</span> <span class="special">&amp;</span> <span class="identifier">cond</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">system_time</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">abs_time</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">duration_type</span><span class="special">&gt;</span>
+ <span class="keyword">void</span> <span class="identifier">relock_on_for</span><span class="special">(</span><span class="identifier">condition</span> <span class="special">&amp;</span> <span class="identifier">cond</span><span class="special">,</span> <span class="identifier">duration_type</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">rel_time</span><span class="special">);</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Predicate</span><span class="special">&gt;</span>
+ <span class="keyword">void</span> <span class="identifier">relock_when</span><span class="special">(</span><span class="identifier">condition</span> <span class="special">&amp;</span><span class="identifier">cond</span><span class="special">,</span> <span class="identifier">Predicate</span> <span class="identifier">pred</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Predicate</span><span class="special">&gt;</span>
+ <span class="keyword">void</span> <span class="identifier">relock_when_until</span><span class="special">(</span><span class="identifier">condition</span> <span class="special">&amp;</span><span class="identifier">cond</span><span class="special">,</span> <span class="identifier">Predicate</span> <span class="identifier">pred</span><span class="special">,</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">system_time</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">abs_time</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Predicate</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">duration_type</span><span class="special">&gt;</span>
+ <span class="keyword">void</span> <span class="identifier">relock_when_for</span><span class="special">(</span><span class="identifier">condition</span> <span class="special">&amp;</span><span class="identifier">cond</span><span class="special">,</span> <span class="identifier">Predicate</span> <span class="identifier">pred</span><span class="special">,</span>
+ <span class="identifier">duration_type</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">rel_time</span><span class="special">);</span>
+
+<span class="keyword">private</span><span class="special">:</span>
+ <span class="keyword">friend</span> <span class="keyword">class</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">condition_variable</span><span class="special">;</span>
+ <span class="keyword">friend</span> <span class="keyword">class</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">condition_variable_any</span><span class="special">;</span>
+ <span class="keyword">friend</span> <span class="keyword">class</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">interprocess</span><span class="special">::</span><span class="identifier">condition</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+</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"><div class="copyright-footer">Copyright © 2008 Vicente J. Botet Escriba<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="generic_free_functions_on_multiple_lockables.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="lockers.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/synchro/libs/synchro/doc/html/boost_synchro/reference/generic_free_functions_on_lockable.html
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/html/boost_synchro/reference/generic_free_functions_on_lockable.html 2009-10-12 17:49:35 EDT (Mon, 12 Oct 2009)
@@ -0,0 +1,1498 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Generic
+ Free Functions on Lockable</title>
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+<link rel="start" href="../../index.html" title="Chapter 1. Boost.Synchro">
+<link rel="up" href="../reference.html" title="Reference">
+<link rel="prev" href="lockables.html" title="Lockables">
+<link rel="next" href="generic_free_functions_on_multiple_lockables.html" title="Generic
+ Free Functions on Multiple Lockables">
+</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">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="lockables.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="generic_free_functions_on_multiple_lockables.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_synchro.reference.generic_free_functions_on_lockable"></a><a href="generic_free_functions_on_lockable.html" title="Generic
+ Free Functions on Lockable">Generic
+ Free Functions on Lockable</a>
+</h3></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.lock_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">lock</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.unlock_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">unlock</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.try_lock_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">try_lock</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.try_lock_until_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">try_lock_until</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.try_lock_for_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">try_lock_for</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.lock_until_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">lock_until</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.lock_for_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">lock_for</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.lock_shared_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">lock_shared</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.unlock_shared_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">unlock_shared</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.try_lock_shared_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">try_lock_shared</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.try_lock_shared_for_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">try_lock_shared_for</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.lock_shared_until_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">lock_shared_until</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.lock_shared_for_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">lock_shared_for</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.lock_upgrade_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">lock_upgrade</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.unlock_upgrade_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">unlock_upgrade</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.try_lock_upgrade_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">try_lock_upgrade</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.try_lock_upgrade_until_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">try_lock_upgrade_until</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.lock_upgrade_until_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">lock_upgrade_until</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.lock_upgrade_for_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">lock_upgrade_for</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.unlock_and_lock_upgrade_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">unlock_and_lock_upgrade</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.unlock_and_lock_shared_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">unlock_and_lock_shared</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.unlock_upgrade_and_lock_shared_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">unlock_upgrade_and_lock_shared</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.unlock_upgrade_and_lock_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">unlock_upgrade_and_lock</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.unlock_upgrade_and_lock_until_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">unlock_upgrade_and_lock_until</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.unlock_upgrade_and_lock_for_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">unlock_upgrade_and_lock_for</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.try_unlock_upgrade_and_lock_until_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">try_unlock_upgrade_and_lock_until</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.try_unlock_upgrade_and_lock_for_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">try_unlock_upgrade_and_lock_for</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.unlock_shared_and_lock_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">unlock_shared_and_lock</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.try_unlock_shared_and_lock_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">try_unlock_shared_and_lock_hpp</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.try_unlock_shared_and_lock_upgrade_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">try_unlock_shared_and_lock_upgrade</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+</dl></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.generic_free_functions_on_lockable.lock_hpp"></a><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.lock_hpp" title="
+ Header &lt;boost/sychro/lockable/lock.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">lock</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<p>
+ Defines a free function <code class="computeroutput"><span class="identifier">lock</span></code>
+ which locks the <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ passed as parameter. The default implementation applies the <code class="computeroutput"><span class="identifier">lock</span></code> member function to the <code class="computeroutput"><span class="identifier">Lockable</span></code>. A user adapting another <code class="computeroutput"><span class="identifier">Lockable</span></code> could need to specialize the
+ <code class="computeroutput"><span class="identifier">lock</span></code> free function if the
+ <code class="computeroutput"><span class="identifier">Lockable</span></code> do not provides
+ a <code class="computeroutput"><span class="identifier">lock</span></code> member function
+ with the same prototype.
+ </p>
+<p>
+ As for the moment we can not partially specialize a function a trick is
+ used: instead of calling directly to the <code class="computeroutput"><span class="identifier">lock</span></code>
+ member function, <code class="computeroutput"><span class="identifier">lock</span></code> calls
+ to the static operation apply on a class with the same name in the namespace
+ __partial_specialization<span class="underline">workaround</span>_.
+ So the user can specialize partially this class.
+ </p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">synchro</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">lockable</span> <span class="special">{</span>
+ <span class="keyword">namespace</span> <span class="identifier">result_of</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">lock</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="keyword">void</span> <span class="identifier">type</span><span class="special">;</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">lock</span> <span class="special">{</span>
+ <span class="keyword">static</span> <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">lock</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">apply</span><span class="special">(</span> <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span> <span class="special">);</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">lock</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">lock</span><span class="special">(</span><span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span><span class="special">);</span>
+<span class="special">}}}</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.generic_free_functions_on_lockable.unlock_hpp"></a><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.unlock_hpp" title="
+ Header &lt;boost/sychro/lockable/unlock.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">unlock</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<p>
+ Defines a free function <code class="computeroutput"><span class="identifier">unlock</span></code>
+ which lock upgrade the <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ passed as parameter. The default implementation applies the <code class="computeroutput"><span class="identifier">unlock</span></code> member function to the <code class="computeroutput"><span class="identifier">Lockable</span></code>. A user adapting another <code class="computeroutput"><span class="identifier">Lockable</span></code> could need to specialize the
+ <code class="computeroutput"><span class="identifier">unlock</span></code> free function if
+ the <code class="computeroutput"><span class="identifier">Lockable</span></code> do not provides
+ a <code class="computeroutput"><span class="identifier">unlock</span></code> member function
+ with the same prototype.
+ </p>
+<p>
+ As for the moment we can not partially specialize a function a trick is
+ used: instead of calling directly to the <code class="computeroutput"><span class="identifier">unlock</span></code>
+ member function, <code class="computeroutput"><span class="identifier">unlock</span></code>
+ calls to the static operation apply on a class with the same name in the
+ namespace __partial_specialization<span class="underline">workaround</span>_.
+ So the user can specialize partially this class.
+ </p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">synchro</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">lockable</span> <span class="special">{</span>
+ <span class="keyword">namespace</span> <span class="identifier">result_of</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">unlock</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="keyword">void</span> <span class="identifier">type</span><span class="special">;</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">Lockable</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">unlock</span> <span class="special">{</span>
+ <span class="keyword">static</span> <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">unlock</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">apply</span><span class="special">(</span> <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span> <span class="special">);</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">unlock</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">unlock</span><span class="special">(</span><span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span><span class="special">);</span>
+<span class="special">}}}</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.generic_free_functions_on_lockable.try_lock_hpp"></a><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.try_lock_hpp" title="
+ Header &lt;boost/sychro/lockable/try_lock.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">try_lock</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<p>
+ Defines a free function <code class="computeroutput"><span class="identifier">try_lock</span></code>
+ which try to lock the <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ passed as parameter and return false if unsucessful. The default implementation
+ applies the <code class="computeroutput"><span class="identifier">try_lock</span></code> member
+ function to the <code class="computeroutput"><span class="identifier">Lockable</span></code>.
+ A user adapting another <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ could need to specialize the <code class="computeroutput"><span class="identifier">try_lock</span></code>
+ free function if the <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ do not provides a <code class="computeroutput"><span class="identifier">try_lock</span></code>
+ member function with the same prototype.
+ </p>
+<p>
+ As for the moment we can not partially specialize a function a trick is
+ used: instead of calling directly to the <code class="computeroutput"><span class="identifier">try_lock</span></code>
+ member function, <code class="computeroutput"><span class="identifier">try_lock</span></code>
+ calls to the static operation apply on a class with the same name in the
+ namespace __partial_specialization<span class="underline">workaround</span>_.
+ So the user can specialize partially this class.
+ </p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">synchro</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">lockable</span> <span class="special">{</span>
+ <span class="keyword">namespace</span> <span class="identifier">result_of</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">try_lock</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="keyword">bool</span> <span class="identifier">type</span><span class="special">;</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">Lockable</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">try_lock</span> <span class="special">{</span>
+ <span class="keyword">static</span> <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">try_lock</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">apply</span><span class="special">(</span> <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span> <span class="special">);</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">try_lock</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">try_lock</span><span class="special">(</span><span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span><span class="special">);</span>
+<span class="special">}}}</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.generic_free_functions_on_lockable.try_lock_until_hpp"></a><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.try_lock_until_hpp" title="
+ Header &lt;boost/sychro/lockable/try_lock_until.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">try_lock_until</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<p>
+ Defines a free function <code class="computeroutput"><span class="identifier">lock_shared_until</span></code>
+ which locks shared the <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ passed as parameter until a given time is reached. The default implementation
+ applies the <code class="computeroutput"><span class="identifier">lock_shared_until</span></code>
+ member function to the <code class="computeroutput"><span class="identifier">Lockable</span></code>.
+ A user adapting another <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ could need to specialize the <code class="computeroutput"><span class="identifier">lock_shared_until</span></code>
+ free function if the __lock_shared<span class="underline">untilable</span>_
+ do not provides a <code class="computeroutput"><span class="identifier">lock_shared_until</span></code>
+ member function with the same prototype.
+ </p>
+<p>
+ As for the moment we can not partially specialize a function a trick is
+ used: instead of calling directly to the <code class="computeroutput"><span class="identifier">lock_shared_until</span></code>
+ member function, <code class="computeroutput"><span class="identifier">lock_shared_until</span></code>
+ calls to the static operation apply on a class with the same name in the
+ namespace unlock_upgrade_and_lock_until. So the user can specialize partially
+ this class.
+ </p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">synchro</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">lockable</span> <span class="special">{</span>
+ <span class="keyword">namespace</span> <span class="identifier">result_of</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">try_lock_until</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="keyword">bool</span> <span class="identifier">type</span><span class="special">;</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">try_lock_until</span> <span class="special">{</span>
+ <span class="keyword">static</span> <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">try_lock_until</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">,</span><span class="identifier">Clock</span><span class="special">,</span><span class="identifier">Duration</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">apply</span><span class="special">(</span> <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">&gt;&amp;</span> <span class="identifier">abs_time</span> <span class="special">);</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span> <span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">try_lock_until</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">,</span><span class="identifier">Clock</span><span class="special">,</span><span class="identifier">Duration</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">try_lock_until</span><span class="special">(</span><span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">&gt;&amp;</span> <span class="identifier">abs_time</span><span class="special">);</span>
+<span class="special">}}}</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.generic_free_functions_on_lockable.try_lock_for_hpp"></a><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.try_lock_for_hpp" title="
+ Header &lt;boost/sychro/lockable/try_lock_for.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">try_lock_for</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<p>
+ Defines a free function <code class="computeroutput"><span class="identifier">try_lock_for</span></code>
+ which tries to locks the <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ passed as parameter until a given time is elapsed. The default implementation
+ applies the <code class="computeroutput"><span class="identifier">try_lock_for</span></code>
+ member function to the <code class="computeroutput"><span class="identifier">Lockable</span></code>.
+ A user adapting another <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ could need to specialize the <code class="computeroutput"><span class="identifier">try_lock_for</span></code>
+ free function if the <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ do not provides a <code class="computeroutput"><span class="identifier">try_lock_for</span></code>
+ member function with the same prototype.
+ </p>
+<p>
+ As for the moment we can not partially specialize a function a trick is
+ used: instead of calling directly to the <code class="computeroutput"><span class="identifier">try_lock_for</span></code>
+ member function, <code class="computeroutput"><span class="identifier">try_lock_for</span></code>
+ calls to the static operation apply on a class with the same name in the
+ namespace __partial_specialization<span class="underline">workaround</span>_.
+ So the user can specialize partially this class.
+ </p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">synchro</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">lockable</span> <span class="special">{</span>
+ <span class="keyword">namespace</span> <span class="identifier">result_of</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">try_lock_for</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="keyword">bool</span> <span class="identifier">type</span><span class="special">;</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">try_lock_for</span> <span class="special">{</span>
+ <span class="keyword">static</span> <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">try_lock_for</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">,</span><span class="identifier">Rep</span><span class="special">,</span><span class="identifier">Period</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">apply</span><span class="special">(</span> <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special">&lt;</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">&gt;&amp;</span> <span class="identifier">rel_time</span> <span class="special">);</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span> <span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">try_lock_for</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">,</span><span class="identifier">Rep</span><span class="special">,</span><span class="identifier">Period</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">try_lock_for</span><span class="special">(</span><span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special">&lt;</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">&gt;&amp;</span> <span class="identifier">abs_time</span><span class="special">);</span>
+<span class="special">}}}</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.generic_free_functions_on_lockable.lock_until_hpp"></a><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.lock_until_hpp" title="
+ Header &lt;boost/sychro/lockable/lock_until.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">lock_until</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<p>
+ Defines a free function <code class="computeroutput"><span class="identifier">lock_until</span></code>
+ which lock the <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ passed as parameter until a given time is reached. The default implementation
+ applies the <code class="computeroutput"><span class="identifier">lock_until</span></code>
+ member function to the <code class="computeroutput"><span class="identifier">Lockable</span></code>.
+ A user adapting another <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ could need to specialize the <code class="computeroutput"><span class="identifier">lock_until</span></code>
+ free function if the __lock<span class="underline">untilable</span>_
+ do not provides a <code class="computeroutput"><span class="identifier">lock_until</span></code>
+ member function with the same prototype.
+ </p>
+<p>
+ As for the moment we can not partially specialize a function a trick is
+ used: instead of calling directly to the <code class="computeroutput"><span class="identifier">lock_until</span></code>
+ member function, <code class="computeroutput"><span class="identifier">lock_until</span></code>
+ calls to the static operation apply on a class with the same name in the
+ namespace __partial_specialization<span class="underline">workaround</span>_.
+ So the user can specialize partially this class.
+ </p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">synchro</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">lockable</span> <span class="special">{</span>
+ <span class="keyword">namespace</span> <span class="identifier">result_of</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">lock_until</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="keyword">void</span> <span class="identifier">type</span><span class="special">;</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">lock_until</span> <span class="special">{</span>
+ <span class="keyword">static</span> <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">lock_until</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">,</span><span class="identifier">Clock</span><span class="special">,</span><span class="identifier">Duration</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">apply</span><span class="special">(</span> <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">&gt;&amp;</span> <span class="identifier">abs_time</span> <span class="special">);</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span> <span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">lock_until</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">,</span><span class="identifier">Clock</span><span class="special">,</span><span class="identifier">Duration</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">lock_until</span><span class="special">(</span><span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">&gt;&amp;</span> <span class="identifier">abs_time</span><span class="special">);</span>
+<span class="special">}}}</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.generic_free_functions_on_lockable.lock_for_hpp"></a><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.lock_for_hpp" title="
+ Header &lt;boost/sychro/lockable/lock_for.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">lock_for</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<p>
+ Defines a free function <code class="computeroutput"><span class="identifier">lock_for</span></code>
+ which lock the <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ passed as parameter until a given time is elapsed. The default implementation
+ applies the <code class="computeroutput"><span class="identifier">lock_for</span></code> member
+ function to the <code class="computeroutput"><span class="identifier">Lockable</span></code>.
+ A user adapting another <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ could need to specialize the <code class="computeroutput"><span class="identifier">lock_for</span></code>
+ free function if the <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ do not provides a <code class="computeroutput"><span class="identifier">lock_for</span></code>
+ member function with the same prototype.
+ </p>
+<p>
+ As for the moment we can not partially specialize a function a trick is
+ used: instead of calling directly to the <code class="computeroutput"><span class="identifier">lock_for</span></code>
+ member function, <code class="computeroutput"><span class="identifier">lock_for</span></code>
+ calls to the static operation apply on a class with the same name in the
+ namespace __partial_specialization<span class="underline">workaround</span>_.
+ So the user can specialize partially this class.
+ </p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">synchro</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">lockable</span> <span class="special">{</span>
+ <span class="keyword">namespace</span> <span class="identifier">result_of</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">lock_for</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="keyword">void</span> <span class="identifier">type</span><span class="special">;</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">lock_for</span> <span class="special">{</span>
+ <span class="keyword">static</span> <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">lock_for</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">apply</span><span class="special">(</span> <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special">&lt;</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">&gt;&amp;</span> <span class="identifier">rel_time</span> <span class="special">);</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span> <span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">lock_for</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">lock_for</span><span class="special">(</span><span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special">&lt;</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">&gt;&amp;</span> <span class="identifier">abs_time</span><span class="special">);</span>
+<span class="special">}}}</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.generic_free_functions_on_lockable.lock_shared_hpp"></a><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.lock_shared_hpp" title="
+ Header &lt;boost/sychro/lockable/lock_shared.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">lock_shared</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<p>
+ Defines a free function <code class="computeroutput"><span class="identifier">lock_shared</span></code>
+ which lock shared the <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ passed as parameter. The default implementation applies the <code class="computeroutput"><span class="identifier">lock_shared</span></code> member function to the <code class="computeroutput"><span class="identifier">Lockable</span></code>. A user adapting another <code class="computeroutput"><span class="identifier">Lockable</span></code> could need to specialize the
+ <code class="computeroutput"><span class="identifier">lock_shared</span></code> free function
+ if the <code class="computeroutput"><span class="identifier">Lockable</span></code> do not
+ provides a <code class="computeroutput"><span class="identifier">lock_shared</span></code>
+ member function with the same prototype.
+ </p>
+<p>
+ As for the moment we can not partially specialize a function a trick is
+ used: instead of calling directly to the <code class="computeroutput"><span class="identifier">lock_shared</span></code>
+ member function, <code class="computeroutput"><span class="identifier">lock_shared</span></code>
+ calls to the static operation apply on a class with the same name in the
+ namespace __partial_specialization<span class="underline">workaround</span>_.
+ So the user can specialize partially this class.
+ </p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">synchro</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">lockable</span> <span class="special">{</span>
+ <span class="keyword">namespace</span> <span class="identifier">result_of</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">lock_shared</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="keyword">void</span> <span class="identifier">type</span><span class="special">;</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">Lockable</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">lock_shared</span> <span class="special">{</span>
+ <span class="keyword">static</span> <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">lock_shared</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">apply</span><span class="special">(</span> <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span> <span class="special">);</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">lock_shared</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">lock_shared</span><span class="special">(</span><span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span><span class="special">);</span>
+<span class="special">}}}</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.generic_free_functions_on_lockable.unlock_shared_hpp"></a><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.unlock_shared_hpp" title="
+ Header &lt;boost/sychro/lockable/unlock_shared.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">unlock_shared</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<p>
+ Defines a free function <code class="computeroutput"><span class="identifier">unlock_shared</span></code>
+ which lock upgrade the <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ passed as parameter. The default implementation applies the <code class="computeroutput"><span class="identifier">unlock_shared</span></code> member function to the
+ <code class="computeroutput"><span class="identifier">Lockable</span></code>. A user adapting
+ another <code class="computeroutput"><span class="identifier">Lockable</span></code> could
+ need to specialize the <code class="computeroutput"><span class="identifier">unlock_shared</span></code>
+ free function if the <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ do not provides a <code class="computeroutput"><span class="identifier">unlock_shared</span></code>
+ member function with the same prototype.
+ </p>
+<p>
+ As for the moment we can not partially specialize a function a trick is
+ used: instead of calling directly to the <code class="computeroutput"><span class="identifier">unlock_shared</span></code>
+ member function, <code class="computeroutput"><span class="identifier">unlock_shared</span></code>
+ calls to the static operation apply on a class with the same name in the
+ namespace __partial_specialization<span class="underline">workaround</span>_.
+ So the user can specialize partially this class.
+ </p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">synchro</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">lockable</span> <span class="special">{</span>
+ <span class="keyword">namespace</span> <span class="identifier">result_of</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">unlock_shared</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="keyword">void</span> <span class="identifier">type</span><span class="special">;</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">Lockable</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">unlock_shared</span> <span class="special">{</span>
+ <span class="keyword">static</span> <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">unlock_shared</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">apply</span><span class="special">(</span> <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span> <span class="special">);</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">unlock_shared</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">unlock_shared</span><span class="special">(</span><span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span><span class="special">);</span>
+<span class="special">}}}</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.generic_free_functions_on_lockable.try_lock_shared_hpp"></a><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.try_lock_shared_hpp" title="
+ Header &lt;boost/sychro/lockable/try_lock_shared.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">try_lock_shared</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<p>
+ Defines a free function <code class="computeroutput"><span class="identifier">try_lock_shared</span></code>
+ which try to lock the <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ passed as parameter and return false if unsucessful. The default implementation
+ applies the <code class="computeroutput"><span class="identifier">try_lock_shared</span></code>
+ member function to the <code class="computeroutput"><span class="identifier">Lockable</span></code>.
+ A user adapting another <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ could need to specialize the <code class="computeroutput"><span class="identifier">try_lock_shared</span></code>
+ free function if the <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ do not provides a <code class="computeroutput"><span class="identifier">try_lock_shared</span></code>
+ member function with the same prototype.
+ </p>
+<p>
+ As for the moment we can not partially specialize a function a trick is
+ used: instead of calling directly to the <code class="computeroutput"><span class="identifier">try_lock_shared</span></code>
+ member function, <code class="computeroutput"><span class="identifier">try_lock_shared</span></code>
+ calls to the static operation apply on a class with the same name in the
+ namespace __partial_specialization<span class="underline">workaround</span>_.
+ So the user can specialize partially this class.
+ </p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">synchro</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">lockable</span> <span class="special">{</span>
+ <span class="keyword">namespace</span> <span class="identifier">result_of</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">try_lock_shared_shared</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="keyword">bool</span> <span class="identifier">type</span><span class="special">;</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">Lockable</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">try_lock_shared</span> <span class="special">{</span>
+ <span class="keyword">static</span> <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">try_lock_shared</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">apply</span><span class="special">(</span> <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span> <span class="special">);</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">try_lock_shared</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">try_lock_shared</span><span class="special">(</span><span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span><span class="special">);</span>
+<span class="special">}}}</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.generic_free_functions_on_lockable.try_lock_shared_for_hpp"></a><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.try_lock_shared_for_hpp" title="
+ Header &lt;boost/sychro/lockable/try_lock_shared_for.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">try_lock_shared_for</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<p>
+ Defines a free function <code class="computeroutput"><span class="identifier">try_lock_shared_for</span></code>
+ which tries to locks the <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ passed as parameter until a given time is elapsed. The default implementation
+ applies the <code class="computeroutput"><span class="identifier">try_lock_shared_for</span></code>
+ member function to the <code class="computeroutput"><span class="identifier">Lockable</span></code>.
+ A user adapting another <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ could need to specialize the <code class="computeroutput"><span class="identifier">try_lock_shared_for</span></code>
+ free function if the <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ do not provides a <code class="computeroutput"><span class="identifier">try_lock_shared_for</span></code>
+ member function with the same prototype.
+ </p>
+<p>
+ As for the moment we can not partially specialize a function a trick is
+ used: instead of calling directly to the <code class="computeroutput"><span class="identifier">try_lock_shared_for</span></code>
+ member function, <code class="computeroutput"><span class="identifier">try_lock_shared_for</span></code>
+ calls to the static operation apply on a class with the same name in the
+ namespace __partial_specialization<span class="underline">workaround</span>_.
+ So the user can specialize partially this class.
+ </p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">synchro</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">lockable</span> <span class="special">{</span>
+ <span class="keyword">namespace</span> <span class="identifier">result_of</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">try_lock_shared_for</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="keyword">bool</span> <span class="identifier">type</span><span class="special">;</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">try_lock_shared_for</span> <span class="special">{</span>
+ <span class="keyword">static</span> <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">try_lock_shared_for</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">,</span><span class="identifier">Rep</span><span class="special">,</span><span class="identifier">Period</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">apply</span><span class="special">(</span> <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special">&lt;</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">&gt;&amp;</span> <span class="identifier">rel_time</span> <span class="special">);</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span> <span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">try_lock_shared_for</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">,</span><span class="identifier">Rep</span><span class="special">,</span><span class="identifier">Period</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">try_lock_shared_for</span><span class="special">(</span><span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special">&lt;</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">&gt;&amp;</span> <span class="identifier">abs_time</span><span class="special">);</span>
+<span class="special">}}}</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.generic_free_functions_on_lockable.lock_shared_until_hpp"></a><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.lock_shared_until_hpp" title="
+ Header &lt;boost/sychro/lockable/lock_shared_until.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">lock_shared_until</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<p>
+ Defines a free function <code class="computeroutput"><span class="identifier">lock_shared_until</span></code>
+ which locks shared the <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ passed as parameter until a given time is reached. The default implementation
+ applies the <code class="computeroutput"><span class="identifier">lock_shared_until</span></code>
+ member function to the <code class="computeroutput"><span class="identifier">Lockable</span></code>.
+ A user adapting another <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ could need to specialize the <code class="computeroutput"><span class="identifier">lock_shared_until</span></code>
+ free function if the __lock_shared<span class="underline">untilable</span>_
+ do not provides a <code class="computeroutput"><span class="identifier">lock_shared_until</span></code>
+ member function with the same prototype.
+ </p>
+<p>
+ As for the moment we can not partially specialize a function a trick is
+ used: instead of calling directly to the <code class="computeroutput"><span class="identifier">lock_shared_until</span></code>
+ member function, <code class="computeroutput"><span class="identifier">lock_shared_until</span></code>
+ calls to the static operation apply on a class with the same name in the
+ namespace __partial_specialization<span class="underline">workaround</span>_.
+ So the user can specialize partially this class.
+ </p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">synchro</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">lockable</span> <span class="special">{</span>
+ <span class="keyword">namespace</span> <span class="identifier">result_of</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">lock_shared_until</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="keyword">void</span> <span class="identifier">type</span><span class="special">;</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">lock_shared_until</span> <span class="special">{</span>
+ <span class="keyword">static</span> <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">lock_shared_until</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">,</span><span class="identifier">Clock</span><span class="special">,</span><span class="identifier">Duration</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">apply</span><span class="special">(</span> <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">&gt;&amp;</span> <span class="identifier">abs_time</span> <span class="special">);</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span> <span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">lock_shared_until</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">,</span><span class="identifier">Clock</span><span class="special">,</span><span class="identifier">Duration</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">lock_shared_until</span><span class="special">(</span><span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">&gt;&amp;</span> <span class="identifier">abs_time</span><span class="special">);</span>
+<span class="special">}}}</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.generic_free_functions_on_lockable.lock_shared_for_hpp"></a><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.lock_shared_for_hpp" title="
+ Header &lt;boost/sychro/lockable/lock_shared_for.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">lock_shared_for</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<p>
+ Defines a free function <code class="computeroutput"><span class="identifier">lock_shared_for</span></code>
+ which locks shared the <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ passed as parameter until a given time is elepsed. The default implementation
+ applies the <code class="computeroutput"><span class="identifier">lock_shared_for</span></code>
+ member function to the <code class="computeroutput"><span class="identifier">Lockable</span></code>.
+ A user adapting another <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ could need to specialize the <code class="computeroutput"><span class="identifier">lock_shared_for</span></code>
+ free function if the <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ do not provides a <code class="computeroutput"><span class="identifier">lock_shared_for</span></code>
+ member function with the same prototype.
+ </p>
+<p>
+ As for the moment we can not partially specialize a function a trick is
+ used: instead of calling directly to the <code class="computeroutput"><span class="identifier">lock_shared_for</span></code>
+ member function, <code class="computeroutput"><span class="identifier">lock_shared_for</span></code>
+ calls to the static operation apply on a class with the same name in the
+ namespace __partial_specialization<span class="underline">workaround</span>_.
+ So the user can specialize partially this class.
+ </p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">synchro</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">lockable</span> <span class="special">{</span>
+ <span class="keyword">namespace</span> <span class="identifier">result_of</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">lock_shared_for</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="keyword">void</span> <span class="identifier">type</span><span class="special">;</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">lock_shared_for</span> <span class="special">{</span>
+ <span class="keyword">static</span> <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">lock_shared_for</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">,</span><span class="identifier">Rep</span><span class="special">,</span><span class="identifier">Period</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">apply</span><span class="special">(</span> <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special">&lt;</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">&gt;&amp;</span> <span class="identifier">rel_time</span> <span class="special">);</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span> <span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">lock_shared_for</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">,</span><span class="identifier">Rep</span><span class="special">,</span><span class="identifier">Period</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">lock_shared_for</span><span class="special">(</span><span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special">&lt;</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">&gt;&amp;</span> <span class="identifier">abs_time</span><span class="special">);</span>
+<span class="special">}}}</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.generic_free_functions_on_lockable.lock_upgrade_hpp"></a><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.lock_upgrade_hpp" title="
+ Header &lt;boost/sychro/lockable/lock_upgrade.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">lock_upgrade</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<p>
+ Defines a free function <code class="computeroutput"><span class="identifier">lock_upgrade</span></code>
+ which lock upgrade the <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ passed as parameter. The default implementation applies the <code class="computeroutput"><span class="identifier">lock_upgrade</span></code> member function to the
+ <code class="computeroutput"><span class="identifier">Lockable</span></code>. A user adapting
+ another <code class="computeroutput"><span class="identifier">Lockable</span></code> could
+ need to specialize the <code class="computeroutput"><span class="identifier">lock_upgrade</span></code>
+ free function if the <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ do not provides a <code class="computeroutput"><span class="identifier">lock_upgrade</span></code>
+ member function with the same prototype.
+ </p>
+<p>
+ As for the moment we can not partially specialize a function a trick is
+ used: instead of calling directly to the <code class="computeroutput"><span class="identifier">lock_upgrade</span></code>
+ member function, <code class="computeroutput"><span class="identifier">lock_upgrade</span></code>
+ calls to the static operation apply on a class with the same name in the
+ namespace __partial_specialization<span class="underline">workaround</span>_.
+ So the user can specialize partially this class.
+ </p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">synchro</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">lockable</span> <span class="special">{</span>
+ <span class="keyword">namespace</span> <span class="identifier">result_of</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">lock_upgrade</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="keyword">void</span> <span class="identifier">type</span><span class="special">;</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">Lockable</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">lock_upgrade</span> <span class="special">{</span>
+ <span class="keyword">static</span> <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">lock_upgrade</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">apply</span><span class="special">(</span> <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span> <span class="special">);</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">lock_upgrade</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">lock_upgrade</span><span class="special">(</span><span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span><span class="special">);</span>
+<span class="special">}}}</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.generic_free_functions_on_lockable.unlock_upgrade_hpp"></a><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.unlock_upgrade_hpp" title="
+ Header &lt;boost/sychro/lockable/unlock_upgrade.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">unlock_upgrade</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<p>
+ Defines a free function <code class="computeroutput"><span class="identifier">unlock_upgrade</span></code>
+ which lock upgrade the <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ passed as parameter. The default implementation applies the <code class="computeroutput"><span class="identifier">unlock_upgrade</span></code> member function to the
+ <code class="computeroutput"><span class="identifier">Lockable</span></code>. A user adapting
+ another <code class="computeroutput"><span class="identifier">Lockable</span></code> could
+ need to specialize the <code class="computeroutput"><span class="identifier">unlock_upgrade</span></code>
+ free function if the <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ do not provides a <code class="computeroutput"><span class="identifier">unlock_upgrade</span></code>
+ member function with the same prototype.
+ </p>
+<p>
+ As for the moment we can not partially specialize a function a trick is
+ used: instead of calling directly to the <code class="computeroutput"><span class="identifier">unlock_upgrade</span></code>
+ member function, <code class="computeroutput"><span class="identifier">unlock_upgrade</span></code>
+ calls to the static operation apply on a class with the same name in the
+ namespace __partial_specialization<span class="underline">workaround</span>_.
+ So the user can specialize partially this class.
+ </p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">synchro</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">lockable</span> <span class="special">{</span>
+ <span class="keyword">namespace</span> <span class="identifier">result_of</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">unlock_upgrade</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="keyword">void</span> <span class="identifier">type</span><span class="special">;</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">Lockable</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">unlock_upgrade</span> <span class="special">{</span>
+ <span class="keyword">static</span> <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">unlock_upgrade</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">apply</span><span class="special">(</span> <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span> <span class="special">);</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">unlock_upgrade</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">unlock_upgrade</span><span class="special">(</span><span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span><span class="special">);</span>
+<span class="special">}}}</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.generic_free_functions_on_lockable.try_lock_upgrade_hpp"></a><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.try_lock_upgrade_hpp" title="
+ Header &lt;boost/sychro/lockable/try_lock_upgrade.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">try_lock_upgrade</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<p>
+ Defines a free function <code class="computeroutput"><span class="identifier">try_lock_upgrade</span></code>
+ which try to lock the <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ passed as parameter and return false if unsucessful. The default implementation
+ applies the <code class="computeroutput"><span class="identifier">try_lock_upgrade</span></code>
+ member function to the <code class="computeroutput"><span class="identifier">Lockable</span></code>.
+ A user adapting another <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ could need to specialize the <code class="computeroutput"><span class="identifier">try_lock_upgrade</span></code>
+ free function if the <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ do not provides a <code class="computeroutput"><span class="identifier">try_lock_upgrade</span></code>
+ member function with the same prototype.
+ </p>
+<p>
+ As for the moment we can not partially specialize a function a trick is
+ used: instead of calling directly to the <code class="computeroutput"><span class="identifier">try_lock_upgrade</span></code>
+ member function, <code class="computeroutput"><span class="identifier">try_lock_upgrade</span></code>
+ calls to the static operation apply on a class with the same name in the
+ namespace __partial_specialization<span class="underline">workaround</span>_.
+ So the user can specialize partially this class.
+ </p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">synchro</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">lockable</span> <span class="special">{</span>
+ <span class="keyword">namespace</span> <span class="identifier">result_of</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">try_lock_upgrade_shared</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="keyword">bool</span> <span class="identifier">type</span><span class="special">;</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">Lockable</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">try_lock_upgrade</span> <span class="special">{</span>
+ <span class="keyword">static</span> <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">try_lock_upgrade</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">apply</span><span class="special">(</span> <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span> <span class="special">);</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">try_lock_upgrade</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">try_lock_upgrade</span><span class="special">(</span><span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span><span class="special">);</span>
+<span class="special">}}}</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.generic_free_functions_on_lockable.try_lock_upgrade_until_hpp"></a><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.try_lock_upgrade_until_hpp" title="
+ Header &lt;boost/sychro/lockable/try_lock_upgrade_until.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">try_lock_upgrade_until</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<p>
+ Defines a free function <code class="computeroutput"><span class="identifier">lock_shared_until</span></code>
+ which locks shared the <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ passed as parameter until a given time is reached. The default implementation
+ applies the <code class="computeroutput"><span class="identifier">lock_shared_until</span></code>
+ member function to the <code class="computeroutput"><span class="identifier">Lockable</span></code>.
+ A user adapting another <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ could need to specialize the <code class="computeroutput"><span class="identifier">lock_shared_until</span></code>
+ free function if the __lock_shared<span class="underline">untilable</span>_
+ do not provides a <code class="computeroutput"><span class="identifier">lock_shared_until</span></code>
+ member function with the same prototype.
+ </p>
+<p>
+ As for the moment we can not partially specialize a function a trick is
+ used: instead of calling directly to the <code class="computeroutput"><span class="identifier">lock_shared_until</span></code>
+ member function, <code class="computeroutput"><span class="identifier">lock_shared_until</span></code>
+ calls to the static operation apply on a class with the same name in the
+ namespace unlock_upgrade_and_lock_until. So the user can specialize partially
+ this class.
+ </p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">synchro</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">lockable</span> <span class="special">{</span>
+ <span class="keyword">namespace</span> <span class="identifier">result_of</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">try_lock_upgrade_until</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="keyword">bool</span> <span class="identifier">type</span><span class="special">;</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">try_lock_upgrade_until</span> <span class="special">{</span>
+ <span class="keyword">static</span> <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">try_lock_upgrade_until</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">,</span><span class="identifier">Clock</span><span class="special">,</span><span class="identifier">Duration</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">apply</span><span class="special">(</span> <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">&gt;&amp;</span> <span class="identifier">abs_time</span> <span class="special">);</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span> <span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">try_lock_upgrade_until</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">,</span><span class="identifier">Clock</span><span class="special">,</span><span class="identifier">Duration</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">try_lock_upgrade_until</span><span class="special">(</span><span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">&gt;&amp;</span> <span class="identifier">abs_time</span><span class="special">);</span>
+<span class="special">}}}</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.generic_free_functions_on_lockable.lock_upgrade_until_hpp"></a><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.lock_upgrade_until_hpp" title="
+ Header &lt;boost/sychro/lockable/lock_upgrade_until.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">lock_upgrade_until</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<p>
+ Defines a free function <code class="computeroutput"><span class="identifier">lock_shared_until</span></code>
+ which locks shared the <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ passed as parameter until a given time is reached. The default implementation
+ applies the <code class="computeroutput"><span class="identifier">lock_shared_until</span></code>
+ member function to the <code class="computeroutput"><span class="identifier">Lockable</span></code>.
+ A user adapting another <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ could need to specialize the <code class="computeroutput"><span class="identifier">lock_shared_until</span></code>
+ free function if the __lock_shared<span class="underline">untilable</span>_
+ do not provides a <code class="computeroutput"><span class="identifier">lock_shared_until</span></code>
+ member function with the same prototype.
+ </p>
+<p>
+ As for the moment we can not partially specialize a function a trick is
+ used: instead of calling directly to the <code class="computeroutput"><span class="identifier">lock_shared_until</span></code>
+ member function, <code class="computeroutput"><span class="identifier">lock_shared_until</span></code>
+ calls to the static operation apply on a class with the same name in the
+ namespace __partial_specialization<span class="underline">workaround</span>_.
+ So the user can specialize partially this class.
+ </p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">synchro</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">lockable</span> <span class="special">{</span>
+ <span class="keyword">namespace</span> <span class="identifier">result_of</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">lock_upgrade_until</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="keyword">void</span> <span class="identifier">type</span><span class="special">;</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">lock_upgrade_until</span> <span class="special">{</span>
+ <span class="keyword">static</span> <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">lock_upgrade_until</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">,</span><span class="identifier">Clock</span><span class="special">,</span><span class="identifier">Duration</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">apply</span><span class="special">(</span> <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">&gt;&amp;</span> <span class="identifier">abs_time</span> <span class="special">);</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span> <span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">lock_upgrade_until</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">,</span><span class="identifier">Clock</span><span class="special">,</span><span class="identifier">Duration</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">lock_upgrade_until</span><span class="special">(</span><span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">&gt;&amp;</span> <span class="identifier">abs_time</span><span class="special">);</span>
+<span class="special">}}}</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.generic_free_functions_on_lockable.lock_upgrade_for_hpp"></a><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.lock_upgrade_for_hpp" title="
+ Header &lt;boost/sychro/lockable/lock_upgrade_for.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">lock_upgrade_for</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<p>
+ Defines a free function <code class="computeroutput"><span class="identifier">lock_upgrade_for</span></code>
+ which locks shared the <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ passed as parameter until a given time is elepsed. The default implementation
+ applies the <code class="computeroutput"><span class="identifier">lock_upgrade_for</span></code>
+ member function to the <code class="computeroutput"><span class="identifier">Lockable</span></code>.
+ A user adapting another <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ could need to specialize the <code class="computeroutput"><span class="identifier">lock_upgrade_for</span></code>
+ free function if the <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ do not provides a <code class="computeroutput"><span class="identifier">lock_upgrade_for</span></code>
+ member function with the same prototype.
+ </p>
+<p>
+ As for the moment we can not partially specialize a function a trick is
+ used: instead of calling directly to the <code class="computeroutput"><span class="identifier">lock_upgrade_for</span></code>
+ member function, <code class="computeroutput"><span class="identifier">lock_upgrade_for</span></code>
+ calls to the static operation apply on a class with the same name in the
+ namespace __partial_specialization<span class="underline">workaround</span>_.
+ So the user can specialize partially this class.
+ </p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">synchro</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">lockable</span> <span class="special">{</span>
+ <span class="keyword">namespace</span> <span class="identifier">result_of</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">lock_upgrade_for</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="keyword">void</span> <span class="identifier">type</span><span class="special">;</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">lock_upgrade_for</span> <span class="special">{</span>
+ <span class="keyword">static</span> <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">lock_upgrade_for</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">,</span><span class="identifier">Rep</span><span class="special">,</span><span class="identifier">Period</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">apply</span><span class="special">(</span> <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special">&lt;</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">&gt;&amp;</span> <span class="identifier">rel_time</span> <span class="special">);</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span> <span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">lock_upgrade_for</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">,</span><span class="identifier">Rep</span><span class="special">,</span><span class="identifier">Period</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">lock_upgrade_for</span><span class="special">(</span><span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special">&lt;</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">&gt;&amp;</span> <span class="identifier">abs_time</span><span class="special">);</span>
+<span class="special">}}}</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.generic_free_functions_on_lockable.unlock_and_lock_upgrade_hpp"></a><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.unlock_and_lock_upgrade_hpp" title="
+ Header &lt;boost/sychro/lockable/unlock_and_lock_upgrade.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">unlock_and_lock_upgrade</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<p>
+ Defines a free function <code class="computeroutput"><span class="identifier">unlock_and_lock_upgrade</span></code>
+ which lock upgrade the <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ passed as parameter. The default implementation applies the <code class="computeroutput"><span class="identifier">unlock_and_lock_upgrade</span></code> member function
+ to the <code class="computeroutput"><span class="identifier">Lockable</span></code>. A user
+ adapting another <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ could need to specialize the <code class="computeroutput"><span class="identifier">unlock_and_lock_upgrade</span></code>
+ free function if the <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ do not provides a <code class="computeroutput"><span class="identifier">unlock_and_lock_upgrade</span></code>
+ member function with the same prototype.
+ </p>
+<p>
+ As for the moment we can not partially specialize a function a trick is
+ used: instead of calling directly to the <code class="computeroutput"><span class="identifier">unlock_and_lock_upgrade</span></code>
+ member function, <code class="computeroutput"><span class="identifier">unlock_and_lock_upgrade</span></code>
+ calls to the static operation apply on a class with the same name in the
+ namespace __partial_specialization<span class="underline">workaround</span>_.
+ So the user can specialize partially this class.
+ </p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">synchro</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">lockable</span> <span class="special">{</span>
+ <span class="keyword">namespace</span> <span class="identifier">result_of</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">unlock_and_lock_upgrade</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="keyword">void</span> <span class="identifier">type</span><span class="special">;</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">Lockable</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">unlock_and_lock_upgrade</span> <span class="special">{</span>
+ <span class="keyword">static</span> <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">unlock_and_lock_upgrade</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">apply</span><span class="special">(</span> <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span> <span class="special">);</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">unlock_and_lock_upgrade</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">unlock_and_lock_upgrade</span><span class="special">(</span><span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span><span class="special">);</span>
+<span class="special">}}}</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.generic_free_functions_on_lockable.unlock_and_lock_shared_hpp"></a><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.unlock_and_lock_shared_hpp" title="
+ Header &lt;boost/sychro/lockable/unlock_and_lock_shared.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">unlock_and_lock_shared</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<p>
+ Defines a free function <code class="computeroutput"><span class="identifier">unlock_and_lock_shared</span></code>
+ which lock upgrade the <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ passed as parameter. The default implementation applies the <code class="computeroutput"><span class="identifier">unlock_and_lock_shared</span></code> member function
+ to the <code class="computeroutput"><span class="identifier">Lockable</span></code>. A user
+ adapting another <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ could need to specialize the <code class="computeroutput"><span class="identifier">unlock_and_lock_shared</span></code>
+ free function if the <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ do not provides a <code class="computeroutput"><span class="identifier">unlock_and_lock_shared</span></code>
+ member function with the same prototype.
+ </p>
+<p>
+ As for the moment we can not partially specialize a function a trick is
+ used: instead of calling directly to the <code class="computeroutput"><span class="identifier">unlock_and_lock_shared</span></code>
+ member function, <code class="computeroutput"><span class="identifier">unlock_and_lock_shared</span></code>
+ calls to the static operation apply on a class with the same name in the
+ namespace __partial_specialization<span class="underline">workaround</span>_.
+ So the user can specialize partially this class.
+ </p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">synchro</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">lockable</span> <span class="special">{</span>
+ <span class="keyword">namespace</span> <span class="identifier">result_of</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">unlock_and_lock_shared</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="keyword">void</span> <span class="identifier">type</span><span class="special">;</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">Lockable</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">unlock_and_lock_shared</span> <span class="special">{</span>
+ <span class="keyword">static</span> <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">unlock_and_lock_shared</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">apply</span><span class="special">(</span> <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span> <span class="special">);</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">unlock_and_lock_shared</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">unlock_and_lock_shared</span><span class="special">(</span><span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span><span class="special">);</span>
+<span class="special">}}}</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.generic_free_functions_on_lockable.unlock_upgrade_and_lock_shared_hpp"></a><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.unlock_upgrade_and_lock_shared_hpp" title="
+ Header &lt;boost/sychro/lockable/unlock_upgrade_and_lock_shared.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">unlock_upgrade_and_lock_shared</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<p>
+ Defines a free function <code class="computeroutput"><span class="identifier">unlock_upgrade_and_lock_shared</span></code>
+ which lock upgrade the <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ passed as parameter. The default implementation applies the <code class="computeroutput"><span class="identifier">unlock_upgrade_and_lock_shared</span></code> member
+ function to the <code class="computeroutput"><span class="identifier">Lockable</span></code>.
+ A user adapting another <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ could need to specialize the <code class="computeroutput"><span class="identifier">unlock_upgrade_and_lock_shared</span></code>
+ free function if the <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ do not provides a <code class="computeroutput"><span class="identifier">unlock_upgrade_and_lock_shared</span></code>
+ member function with the same prototype.
+ </p>
+<p>
+ As for the moment we can not partially specialize a function a trick is
+ used: instead of calling directly to the <code class="computeroutput"><span class="identifier">unlock_upgrade_and_lock_shared</span></code>
+ member function, <code class="computeroutput"><span class="identifier">unlock_upgrade_and_lock_shared</span></code>
+ calls to the static operation apply on a class with the same name in the
+ namespace __partial_specialization<span class="underline">workaround</span>_.
+ So the user can specialize partially this class.
+ </p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">synchro</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">lockable</span> <span class="special">{</span>
+ <span class="keyword">namespace</span> <span class="identifier">result_of</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">unlock_upgrade_and_lock_shared</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="keyword">void</span> <span class="identifier">type</span><span class="special">;</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">Lockable</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">unlock_upgrade_and_lock_shared</span> <span class="special">{</span>
+ <span class="keyword">static</span> <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">unlock_upgrade_and_lock_shared</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">apply</span><span class="special">(</span> <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span> <span class="special">);</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">unlock_upgrade_and_lock_shared</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">unlock_upgrade_and_lock_shared</span><span class="special">(</span><span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span><span class="special">);</span>
+<span class="special">}}}</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.generic_free_functions_on_lockable.unlock_upgrade_and_lock_hpp"></a><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.unlock_upgrade_and_lock_hpp" title="
+ Header &lt;boost/sychro/lockable/unlock_upgrade_and_lock.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">unlock_upgrade_and_lock</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<p>
+ Defines a free function <code class="computeroutput"><span class="identifier">unlock_upgrade_and_lock</span></code>
+ which lock upgrade the <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ passed as parameter. The default implementation applies the <code class="computeroutput"><span class="identifier">unlock_upgrade_and_lock</span></code> member function
+ to the <code class="computeroutput"><span class="identifier">Lockable</span></code>. A user
+ adapting another <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ could need to specialize the <code class="computeroutput"><span class="identifier">unlock_upgrade_and_lock</span></code>
+ free function if the <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ do not provides a <code class="computeroutput"><span class="identifier">unlock_upgrade_and_lock</span></code>
+ member function with the same prototype.
+ </p>
+<p>
+ As for the moment we can not partially specialize a function a trick is
+ used: instead of calling directly to the <code class="computeroutput"><span class="identifier">unlock_upgrade_and_lock</span></code>
+ member function, <code class="computeroutput"><span class="identifier">unlock_upgrade_and_lock</span></code>
+ calls to the static operation apply on a class with the same name in the
+ namespace __partial_specialization<span class="underline">workaround</span>_.
+ So the user can specialize partially this class.
+ </p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">synchro</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">lockable</span> <span class="special">{</span>
+ <span class="keyword">namespace</span> <span class="identifier">result_of</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">unlock_upgrade_and_lock</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="keyword">void</span> <span class="identifier">type</span><span class="special">;</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">Lockable</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">unlock_upgrade_and_lock</span> <span class="special">{</span>
+ <span class="keyword">static</span> <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">unlock_upgrade_and_lock</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">apply</span><span class="special">(</span> <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span> <span class="special">);</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">unlock_upgrade_and_lock</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">unlock_upgrade_and_lock</span><span class="special">(</span><span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span><span class="special">);</span>
+<span class="special">}}}</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.generic_free_functions_on_lockable.unlock_upgrade_and_lock_until_hpp"></a><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.unlock_upgrade_and_lock_until_hpp" title="
+ Header &lt;boost/sychro/lockable/unlock_upgrade_and_lock_until.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">unlock_upgrade_and_lock_until</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<p>
+ Defines a free function <code class="computeroutput"><span class="identifier">lock_shared_until</span></code>
+ which locks shared the <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ passed as parameter until a given time is reached. The default implementation
+ applies the <code class="computeroutput"><span class="identifier">lock_shared_until</span></code>
+ member function to the <code class="computeroutput"><span class="identifier">Lockable</span></code>.
+ A user adapting another <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ could need to specialize the <code class="computeroutput"><span class="identifier">lock_shared_until</span></code>
+ free function if the __lock_shared<span class="underline">untilable</span>_
+ do not provides a <code class="computeroutput"><span class="identifier">lock_shared_until</span></code>
+ member function with the same prototype.
+ </p>
+<p>
+ As for the moment we can not partially specialize a function a trick is
+ used: instead of calling directly to the <code class="computeroutput"><span class="identifier">lock_shared_until</span></code>
+ member function, <code class="computeroutput"><span class="identifier">lock_shared_until</span></code>
+ calls to the static operation apply on a class with the same name in the
+ namespace unlock_upgrade_and_lock_until. So the user can specialize partially
+ this class.
+ </p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">synchro</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">lockable</span> <span class="special">{</span>
+ <span class="keyword">namespace</span> <span class="identifier">result_of</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">lock_upgrade_until</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="keyword">void</span> <span class="identifier">type</span><span class="special">;</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">lock_upgrade_until</span> <span class="special">{</span>
+ <span class="keyword">static</span> <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">lock_upgrade_until</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">,</span><span class="identifier">Clock</span><span class="special">,</span><span class="identifier">Duration</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">apply</span><span class="special">(</span> <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">&gt;&amp;</span> <span class="identifier">abs_time</span> <span class="special">);</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span> <span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">lock_upgrade_until</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">,</span><span class="identifier">Clock</span><span class="special">,</span><span class="identifier">Duration</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">lock_upgrade_until</span><span class="special">(</span><span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">&gt;&amp;</span> <span class="identifier">abs_time</span><span class="special">);</span>
+<span class="special">}}}</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.generic_free_functions_on_lockable.unlock_upgrade_and_lock_for_hpp"></a><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.unlock_upgrade_and_lock_for_hpp" title="
+ Header &lt;boost/sychro/lockable/unlock_upgrade_and_lock_for.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">unlock_upgrade_and_lock_for</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<p>
+ Defines a free function <code class="computeroutput"><span class="identifier">unlock_upgrade_and_lock_for</span></code>
+ which locks shared the <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ passed as parameter until a given time is elepsed. The default implementation
+ applies the <code class="computeroutput"><span class="identifier">unlock_upgrade_and_lock_for</span></code>
+ member function to the <code class="computeroutput"><span class="identifier">Lockable</span></code>.
+ A user adapting another <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ could need to specialize the <code class="computeroutput"><span class="identifier">unlock_upgrade_and_lock_for</span></code>
+ free function if the <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ do not provides a <code class="computeroutput"><span class="identifier">unlock_upgrade_and_lock_for</span></code>
+ member function with the same prototype.
+ </p>
+<p>
+ As for the moment we can not partially specialize a function a trick is
+ used: instead of calling directly to the <code class="computeroutput"><span class="identifier">unlock_upgrade_and_lock_for</span></code>
+ member function, <code class="computeroutput"><span class="identifier">unlock_upgrade_and_lock_for</span></code>
+ calls to the static operation apply on a class with the same name in the
+ namespace __partial_specialization<span class="underline">workaround</span>_.
+ So the user can specialize partially this class.
+ </p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">synchro</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">lockable</span> <span class="special">{</span>
+ <span class="keyword">namespace</span> <span class="identifier">result_of</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">unlock_upgrade_and_lock_for</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="keyword">void</span> <span class="identifier">type</span><span class="special">;</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">unlock_upgrade_and_lock_for</span> <span class="special">{</span>
+ <span class="keyword">static</span> <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">unlock_upgrade_and_lock_for</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">,</span><span class="identifier">Rep</span><span class="special">,</span><span class="identifier">Period</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">apply</span><span class="special">(</span> <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special">&lt;</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">&gt;&amp;</span> <span class="identifier">rel_time</span> <span class="special">);</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span> <span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">unlock_upgrade_and_lock_for</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">,</span><span class="identifier">Rep</span><span class="special">,</span><span class="identifier">Period</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">unlock_upgrade_and_lock_for</span><span class="special">(</span><span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special">&lt;</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">&gt;&amp;</span> <span class="identifier">abs_time</span><span class="special">);</span>
+<span class="special">}}}</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.generic_free_functions_on_lockable.try_unlock_upgrade_and_lock_until_hpp"></a><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.try_unlock_upgrade_and_lock_until_hpp" title="
+ Header &lt;boost/sychro/lockable/try_unlock_upgrade_and_lock_until.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">try_unlock_upgrade_and_lock_until</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<p>
+ Defines a free function <code class="computeroutput"><span class="identifier">lock_shared_until</span></code>
+ which locks shared the <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ passed as parameter until a given time is reached. The default implementation
+ applies the <code class="computeroutput"><span class="identifier">lock_shared_until</span></code>
+ member function to the <code class="computeroutput"><span class="identifier">Lockable</span></code>.
+ A user adapting another <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ could need to specialize the <code class="computeroutput"><span class="identifier">lock_shared_until</span></code>
+ free function if the __lock_shared<span class="underline">untilable</span>_
+ do not provides a <code class="computeroutput"><span class="identifier">lock_shared_until</span></code>
+ member function with the same prototype.
+ </p>
+<p>
+ As for the moment we can not partially specialize a function a trick is
+ used: instead of calling directly to the <code class="computeroutput"><span class="identifier">lock_shared_until</span></code>
+ member function, <code class="computeroutput"><span class="identifier">lock_shared_until</span></code>
+ calls to the static operation apply on a class with the same name in the
+ namespace unlock_upgrade_and_lock_until. So the user can specialize partially
+ this class.
+ </p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">synchro</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">lockable</span> <span class="special">{</span>
+ <span class="keyword">namespace</span> <span class="identifier">result_of</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">try_unlock_upgrade_and_lock_until</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="keyword">bool</span> <span class="identifier">type</span><span class="special">;</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">try_unlock_upgrade_and_lock_until</span> <span class="special">{</span>
+ <span class="keyword">static</span> <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">try_unlock_upgrade_and_lock_until</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">,</span><span class="identifier">Clock</span><span class="special">,</span><span class="identifier">Duration</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">apply</span><span class="special">(</span> <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">&gt;&amp;</span> <span class="identifier">abs_time</span> <span class="special">);</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span> <span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">try_unlock_upgrade_and_lock_until</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">,</span><span class="identifier">Clock</span><span class="special">,</span><span class="identifier">Duration</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">try_unlock_upgrade_and_lock_until</span><span class="special">(</span><span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">&gt;&amp;</span> <span class="identifier">abs_time</span><span class="special">);</span>
+<span class="special">}}}</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.generic_free_functions_on_lockable.try_unlock_upgrade_and_lock_for_hpp"></a><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.try_unlock_upgrade_and_lock_for_hpp" title="
+ Header &lt;boost/sychro/lockable/try_unlock_upgrade_and_lock_for.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">try_unlock_upgrade_and_lock_for</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<p>
+ Defines a free function <code class="computeroutput"><span class="identifier">try_unlock_upgrade_and_lock_until</span></code>
+ which tries to locks the <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ passed as parameter until a given time is elapsed. The default implementation
+ applies the <code class="computeroutput"><span class="identifier">try_unlock_upgrade_and_lock_until</span></code>
+ member function to the <code class="computeroutput"><span class="identifier">Lockable</span></code>.
+ A user adapting another <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ could need to specialize the <code class="computeroutput"><span class="identifier">try_unlock_upgrade_and_lock_until</span></code>
+ free function if the <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ do not provides a <code class="computeroutput"><span class="identifier">try_unlock_upgrade_and_lock_until</span></code>
+ member function with the same prototype.
+ </p>
+<p>
+ As for the moment we can not partially specialize a function a trick is
+ used: instead of calling directly to the <code class="computeroutput"><span class="identifier">try_unlock_upgrade_and_lock_until</span></code>
+ member function, <code class="computeroutput"><span class="identifier">try_unlock_upgrade_and_lock_until</span></code>
+ calls to the static operation apply on a class with the same name in the
+ namespace __partial_specialization<span class="underline">workaround</span>_.
+ So the user can specialize partially this class.
+ </p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">synchro</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">lockable</span> <span class="special">{</span>
+ <span class="keyword">namespace</span> <span class="identifier">result_of</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">try_unlock_upgrade_and_lock_until</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="keyword">bool</span> <span class="identifier">type</span><span class="special">;</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">try_unlock_upgrade_and_lock_until</span> <span class="special">{</span>
+ <span class="keyword">static</span> <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">try_unlock_upgrade_and_lock_until</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">,</span><span class="identifier">Rep</span><span class="special">,</span><span class="identifier">Period</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">apply</span><span class="special">(</span> <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special">&lt;</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">&gt;&amp;</span> <span class="identifier">rel_time</span> <span class="special">);</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span> <span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">try_unlock_upgrade_and_lock_until</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">,</span><span class="identifier">Rep</span><span class="special">,</span><span class="identifier">Period</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">try_unlock_upgrade_and_lock_until</span><span class="special">(</span><span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special">&lt;</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">&gt;&amp;</span> <span class="identifier">abs_time</span><span class="special">);</span>
+<span class="special">}}}</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.generic_free_functions_on_lockable.unlock_shared_and_lock_hpp"></a><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.unlock_shared_and_lock_hpp" title="
+ Header &lt;boost/sychro/lockable/unlock_shared_and_lock.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">unlock_shared_and_lock</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<p>
+ Defines a free function <code class="computeroutput"><span class="identifier">unlock_shared_and_lock</span></code>
+ which lock upgrade the <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ passed as parameter. The default implementation applies the <code class="computeroutput"><span class="identifier">unlock_shared_and_lock</span></code> member function
+ to the <code class="computeroutput"><span class="identifier">Lockable</span></code>. A user
+ adapting another <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ could need to specialize the <code class="computeroutput"><span class="identifier">unlock_shared_and_lock</span></code>
+ free function if the <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ do not provides a <code class="computeroutput"><span class="identifier">unlock_shared_and_lock</span></code>
+ member function with the same prototype.
+ </p>
+<p>
+ As for the moment we can not partially specialize a function a trick is
+ used: instead of calling directly to the <code class="computeroutput"><span class="identifier">unlock_shared_and_lock</span></code>
+ member function, <code class="computeroutput"><span class="identifier">unlock_shared_and_lock</span></code>
+ calls to the static operation apply on a class with the same name in the
+ namespace __partial_specialization<span class="underline">workaround</span>_.
+ So the user can specialize partially this class.
+ </p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">synchro</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">lockable</span> <span class="special">{</span>
+ <span class="keyword">namespace</span> <span class="identifier">result_of</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">unlock_shared_and_lock</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="keyword">void</span> <span class="identifier">type</span><span class="special">;</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">Lockable</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">unlock_shared_and_lock</span> <span class="special">{</span>
+ <span class="keyword">static</span> <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">unlock_shared_and_lock</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">apply</span><span class="special">(</span> <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span> <span class="special">);</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">unlock_shared_and_lock</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">unlock_shared_and_lock</span><span class="special">(</span><span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span><span class="special">);</span>
+<span class="special">}}}</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.generic_free_functions_on_lockable.try_unlock_shared_and_lock_hpp"></a><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.try_unlock_shared_and_lock_hpp" title="
+ Header &lt;boost/sychro/lockable/try_unlock_shared_and_lock_hpp.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">try_unlock_shared_and_lock_hpp</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<p>
+ Defines a free function <code class="computeroutput"><span class="identifier">try_lock_upgrade</span></code>
+ which try to lock the <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ passed as parameter and return false if unsucessful. The default implementation
+ applies the <code class="computeroutput"><span class="identifier">try_lock_upgrade</span></code>
+ member function to the <code class="computeroutput"><span class="identifier">Lockable</span></code>.
+ A user adapting another <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ could need to specialize the <code class="computeroutput"><span class="identifier">try_lock_upgrade</span></code>
+ free function if the <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ do not provides a <code class="computeroutput"><span class="identifier">try_lock_upgrade</span></code>
+ member function with the same prototype.
+ </p>
+<p>
+ As for the moment we can not partially specialize a function a trick is
+ used: instead of calling directly to the <code class="computeroutput"><span class="identifier">try_lock_upgrade</span></code>
+ member function, <code class="computeroutput"><span class="identifier">try_lock_upgrade</span></code>
+ calls to the static operation apply on a class with the same name in the
+ namespace __partial_specialization<span class="underline">workaround</span>_.
+ So the user can specialize partially this class.
+ </p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">synchro</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">lockable</span> <span class="special">{</span>
+ <span class="keyword">namespace</span> <span class="identifier">result_of</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">try_unlock_shared_and_lock</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="keyword">bool</span> <span class="identifier">type</span><span class="special">;</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">Lockable</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">try_lock_upgrade</span> <span class="special">{</span>
+ <span class="keyword">static</span> <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">try_lock_upgrade</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">apply</span><span class="special">(</span> <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span> <span class="special">);</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">try_lock_upgrade</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">try_lock_upgrade</span><span class="special">(</span><span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span><span class="special">);</span>
+<span class="special">}}}</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.generic_free_functions_on_lockable.try_unlock_shared_and_lock_upgrade_hpp"></a><a href="generic_free_functions_on_lockable.html#boost_synchro.reference.generic_free_functions_on_lockable.try_unlock_shared_and_lock_upgrade_hpp" title="
+ Header &lt;boost/sychro/lockable/try_unlock_shared_and_lock_upgrade.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sychro</span><span class="special">/</span><span class="identifier">lockable</span><span class="special">/</span><span class="identifier">try_unlock_shared_and_lock_upgrade</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<p>
+ Defines a free function <code class="computeroutput"><span class="identifier">try_unlock_shared_and_lock_upgrade</span></code>
+ which try to lock the <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ passed as parameter and return false if unsucessful. The default implementation
+ applies the <code class="computeroutput"><span class="identifier">try_unlock_shared_and_lock_upgrade</span></code>
+ member function to the <code class="computeroutput"><span class="identifier">Lockable</span></code>.
+ A user adapting another <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ could need to specialize the <code class="computeroutput"><span class="identifier">try_unlock_shared_and_lock_upgrade</span></code>
+ free function if the <code class="computeroutput"><span class="identifier">Lockable</span></code>
+ do not provides a <code class="computeroutput"><span class="identifier">try_unlock_shared_and_lock_upgrade</span></code>
+ member function with the same prototype.
+ </p>
+<p>
+ As for the moment we can not partially specialize a function a trick is
+ used: instead of calling directly to the <code class="computeroutput"><span class="identifier">try_unlock_shared_and_lock_upgrade</span></code>
+ member function, <code class="computeroutput"><span class="identifier">try_unlock_shared_and_lock_upgrade</span></code>
+ calls to the static operation apply on a class with the same name in the
+ namespace __partial_specialization<span class="underline">workaround</span>_.
+ So the user can specialize partially this class.
+ </p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">synchro</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">lockable</span> <span class="special">{</span>
+ <span class="keyword">namespace</span> <span class="identifier">result_of</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">try_unlock_shared_and_lock_upgrade_shared</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="keyword">bool</span> <span class="identifier">type</span><span class="special">;</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">Lockable</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">try_unlock_shared_and_lock_upgrade</span> <span class="special">{</span>
+ <span class="keyword">static</span> <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">try_unlock_shared_and_lock_upgrade</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">apply</span><span class="special">(</span> <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span> <span class="special">);</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+ <span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">try_unlock_shared_and_lock_upgrade</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">try_unlock_shared_and_lock_upgrade</span><span class="special">(</span><span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span><span class="special">);</span>
+<span class="special">}}}</span>
+</pre>
+</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">Copyright © 2008 Vicente J. Botet Escriba<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="lockables.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="generic_free_functions_on_multiple_lockables.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/synchro/libs/synchro/doc/html/boost_synchro/reference/generic_free_functions_on_multiple_lockables.html
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/html/boost_synchro/reference/generic_free_functions_on_multiple_lockables.html 2009-10-12 17:49:35 EDT (Mon, 12 Oct 2009)
@@ -0,0 +1,46 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Generic
+ Free Functions on Multiple Lockables</title>
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+<link rel="start" href="../../index.html" title="Chapter 1. Boost.Synchro">
+<link rel="up" href="../reference.html" title="Reference">
+<link rel="prev" href="generic_free_functions_on_lockable.html" title="Generic
+ Free Functions on Lockable">
+<link rel="next" href="condition_lockables.html" title="Condition
+ Lockables">
+</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">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="generic_free_functions_on_lockable.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="condition_lockables.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title">
+<a name="boost_synchro.reference.generic_free_functions_on_multiple_lockables"></a><a href="generic_free_functions_on_multiple_lockables.html" title="Generic
+ Free Functions on Multiple Lockables">Generic
+ Free Functions on Multiple Lockables</a>
+</h3></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"><div class="copyright-footer">Copyright © 2008 Vicente J. Botet Escriba<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="generic_free_functions_on_lockable.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="condition_lockables.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/synchro/libs/synchro/doc/html/boost_synchro/reference/high_level.html
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/html/boost_synchro/reference/high_level.html 2009-10-12 17:49:35 EDT (Mon, 12 Oct 2009)
@@ -0,0 +1,160 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>High Level</title>
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+<link rel="start" href="../../index.html" title="Chapter 1. Boost.Synchro">
+<link rel="up" href="../reference.html" title="Reference">
+<link rel="prev" href="other.html" title="Other">
+<link rel="next" href="../examples.html" title="Examples">
+</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">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="other.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../examples.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_synchro.reference.high_level"></a>High Level
+</h3></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="high_level.html#boost_synchro.reference.high_level.monitor_hpp"> Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">monitor</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="high_level.html#boost_synchro.reference.high_level.monitor_hpp.template_class__exclusive_monitor___">Template
+ Class <code class="computeroutput"><span class="identifier">exclusive_monitor</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="high_level.html#boost_synchro.reference.high_level.monitor_hpp.template_class__shared_monitor___">Template
+ Class <code class="computeroutput"><span class="identifier">shared_monitor</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="high_level.html#boost_synchro.reference.high_level.monitor_hpp.template_class__monitor___">Template
+ Class <code class="computeroutput"><span class="identifier">monitor</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+</dl></dd>
+</dl></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.high_level.monitor_hpp"></a><a href="high_level.html#boost_synchro.reference.high_level.monitor_hpp" title=" Header
+ &lt;boost/synchro/monitor.hpp&gt;"> Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">monitor</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="high_level.html#boost_synchro.reference.high_level.monitor_hpp.template_class__exclusive_monitor___">Template
+ Class <code class="computeroutput"><span class="identifier">exclusive_monitor</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="high_level.html#boost_synchro.reference.high_level.monitor_hpp.template_class__shared_monitor___">Template
+ Class <code class="computeroutput"><span class="identifier">shared_monitor</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="high_level.html#boost_synchro.reference.high_level.monitor_hpp.template_class__monitor___">Template
+ Class <code class="computeroutput"><span class="identifier">monitor</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+</dl></div>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">synchro</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">=</span><span class="identifier">thread_mutex</span>
+ <span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Condition</span><span class="special">=</span><span class="identifier">condition_safe</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">best_condition</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="special">&gt;</span>
+ <span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">ScopeTag</span><span class="special">=</span><span class="keyword">typename</span> <span class="identifier">scope_tag</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="special">&gt;</span>
+ <span class="keyword">class</span> <span class="identifier">exclusive_monitor</span><span class="special">;</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">=</span><span class="identifier">thread_shared_mutex</span><span class="special">,</span>
+ <span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Condition</span><span class="special">=</span><span class="identifier">condition_safe</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">best_condition_any</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="special">&gt;</span>
+ <span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">ScopeTag</span><span class="special">=</span><span class="keyword">typename</span> <span class="identifier">scope_tag</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="special">&gt;</span>
+ <span class="keyword">class</span> <span class="identifier">shared_monitor</span><span class="special">;</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">=</span><span class="identifier">thread_mutex</span>
+ <span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">lock_tag</span><span class="special">=</span><span class="keyword">typename</span> <span class="identifier">category_tag</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">ScopeTag</span><span class="special">=</span><span class="keyword">typename</span> <span class="identifier">scope_tag</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">monitor</span><span class="special">;</span>
+<span class="special">}}</span>
+</pre>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.high_level.monitor_hpp.template_class__exclusive_monitor___"></a><a href="high_level.html#boost_synchro.reference.high_level.monitor_hpp.template_class__exclusive_monitor___" title="Template
+ Class exclusive_monitor&lt;&gt;">Template
+ Class <code class="computeroutput"><span class="identifier">exclusive_monitor</span><span class="special">&lt;&gt;</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">=</span><span class="identifier">thread_mutex</span>
+<span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Condition</span><span class="special">=</span><span class="identifier">condition_safe</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">best_condition</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="special">&gt;</span>
+<span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">ScopeTag</span><span class="special">=</span><span class="keyword">typename</span> <span class="identifier">scope_tag</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">exclusive_monitor</span> <span class="special">:</span> <span class="keyword">protected</span> <span class="identifier">lockable_adapter</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="special">{</span>
+ <span class="identifier">BOOST_CONCEPT_ASSERT</span><span class="special">((</span><span class="identifier">LockableConcept</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;));</span>
+<span class="keyword">protected</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">Condition</span> <span class="identifier">condition</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">condition_unique_locker</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">,</span> <span class="identifier">Condition</span><span class="special">,</span> <span class="identifier">ScopeTag</span><span class="special">&gt;</span> <span class="identifier">synchronizer</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.high_level.monitor_hpp.template_class__shared_monitor___"></a><a href="high_level.html#boost_synchro.reference.high_level.monitor_hpp.template_class__shared_monitor___" title="Template
+ Class shared_monitor&lt;&gt;">Template
+ Class <code class="computeroutput"><span class="identifier">shared_monitor</span><span class="special">&lt;&gt;</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">=</span><span class="identifier">thread_shared_mutex</span><span class="special">,</span>
+<span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Condition</span><span class="special">=</span><span class="identifier">condition_safe</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">best_condition_any</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="special">&gt;</span>
+<span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">ScopeTag</span><span class="special">=</span><span class="keyword">typename</span> <span class="identifier">scope_tag</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">shared_monitor</span> <span class="special">:</span> <span class="keyword">protected</span> <span class="identifier">lockable_adapter</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="special">{</span>
+ <span class="identifier">BOOST_CONCEPT_ASSERT</span><span class="special">((</span><span class="identifier">LockableConcept</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;));</span>
+<span class="keyword">protected</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">Condition</span> <span class="identifier">condition</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">condition_unique_locker</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">,</span> <span class="identifier">Condition</span><span class="special">,</span> <span class="identifier">ScopeTag</span><span class="special">&gt;</span> <span class="identifier">synchronizer</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">condition_shared_locker</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">,</span> <span class="identifier">Condition</span><span class="special">,</span> <span class="identifier">ScopeTag</span><span class="special">&gt;</span> <span class="identifier">shared_synchronizer</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.high_level.monitor_hpp.template_class__monitor___"></a><a href="high_level.html#boost_synchro.reference.high_level.monitor_hpp.template_class__monitor___" title="Template
+ Class monitor&lt;&gt;">Template
+ Class <code class="computeroutput"><span class="identifier">monitor</span><span class="special">&lt;&gt;</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">=</span><span class="identifier">thread_mutex</span>
+ <span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">lock_tag</span><span class="special">=</span><span class="keyword">typename</span> <span class="identifier">category_tag</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">ScopeTag</span><span class="special">=</span><span class="keyword">typename</span> <span class="identifier">scope_tag</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">monitor</span><span class="special">;</span>
+
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">ScopeTag</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">monitor</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">,</span> <span class="identifier">exclusive_lock_tag</span><span class="special">,</span> <span class="identifier">ScopeTag</span><span class="special">&gt;</span>
+ <span class="special">:</span> <span class="keyword">protected</span> <span class="identifier">exclusive_monitor</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">,</span> <span class="identifier">ScopeTag</span><span class="special">&gt;</span>
+<span class="special">{};</span>
+
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">ScopeTag</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">monitor</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">,</span> <span class="identifier">sharable_lock_tag</span><span class="special">,</span> <span class="identifier">ScopeTag</span><span class="special">&gt;</span>
+ <span class="special">:</span> <span class="keyword">protected</span> <span class="identifier">shared_monitor</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">,</span> <span class="identifier">ScopeTag</span><span class="special">&gt;</span>
+<span class="special">{};</span>
+
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">ScopeTag</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">monitor</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">,</span> <span class="identifier">upgradable_lock_tag</span><span class="special">,</span> <span class="identifier">ScopeTag</span><span class="special">&gt;</span>
+ <span class="special">:</span> <span class="keyword">protected</span> <span class="identifier">shared_monitor</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">,</span> <span class="identifier">ScopeTag</span><span class="special">&gt;</span>
+<span class="special">{};</span>
+</pre>
+</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"><div class="copyright-footer">Copyright © 2008 Vicente J. Botet Escriba<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="other.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../examples.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/synchro/libs/synchro/doc/html/boost_synchro/reference/lockables.html
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/html/boost_synchro/reference/lockables.html 2009-10-12 17:49:35 EDT (Mon, 12 Oct 2009)
@@ -0,0 +1,1188 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Lockables</title>
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+<link rel="start" href="../../index.html" title="Chapter 1. Boost.Synchro">
+<link rel="up" href="../reference.html" title="Reference">
+<link rel="prev" href="../reference.html" title="Reference">
+<link rel="next" href="generic_free_functions_on_lockable.html" title="Generic
+ Free Functions on Lockable">
+</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">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../reference.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="generic_free_functions_on_lockable.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_synchro.reference.lockables"></a>Lockables
+</h3></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">lockable_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.template_class__has_timed_interface_">Template
+ Class <code class="computeroutput"><span class="identifier">has_timed_interface</span></code></a></span></dt>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.class__is_exclusive_">Class
+ <code class="computeroutput"><span class="identifier">is_exclusive</span></code></a></span></dt>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.class__is_shared_">Class
+ <code class="computeroutput"><span class="identifier">is_shared</span></code></a></span></dt>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.class__is_recursive_">Class
+ <code class="computeroutput"><span class="identifier">is_recursive</span></code></a></span></dt>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.class__is_mono_threaded_">Class
+ <code class="computeroutput"><span class="identifier">is_mono_threaded</span></code></a></span></dt>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.class__is_multi_threaded_">Class
+ <code class="computeroutput"><span class="identifier">is_multi_threaded</span></code></a></span></dt>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.class__is_multi_process_">Class
+ <code class="computeroutput"><span class="identifier">is_multi_process</span></code></a></span></dt>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.class__mutex_type_">Class
+ <code class="computeroutput"><span class="identifier">mutex_type</span></code></a></span></dt>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.class__scoped_lock_">Class
+ <code class="computeroutput"><span class="identifier">scoped_lock</span></code></a></span></dt>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.class__unique_lock_">Class
+ <code class="computeroutput"><span class="identifier">unique_lock</span></code></a></span></dt>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.class__shared_lock_">Class
+ <code class="computeroutput"><span class="identifier">shared_lock</span></code></a></span></dt>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.class__upgrade_lock_">Class
+ <code class="computeroutput"><span class="identifier">upgrade_lock</span></code></a></span></dt>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.class__lock_error_">Class
+ <code class="computeroutput"><span class="identifier">lock_error</span></code></a></span></dt>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.class__moved_object_">Class
+ <code class="computeroutput"><span class="identifier">moved_object</span></code></a></span></dt>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.class__lock_error2_">Class
+ <code class="computeroutput"><span class="identifier">lock_error2</span></code></a></span></dt>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.class__lock_error3_">Class
+ <code class="computeroutput"><span class="identifier">lock_error3</span></code></a></span></dt>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.class__lock_error4_">Class
+ <code class="computeroutput"><span class="identifier">lock_error4</span></code></a></span></dt>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.class__lock_traits_">Class
+ <code class="computeroutput"><span class="identifier">lock_traits</span></code></a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_concept_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">lockable_concepts</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_concept_hpp.template_class__lockableconcept___">Template
+ Class <code class="computeroutput"><span class="identifier">LockableConcept</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_concept_hpp.template_class__timedlockableconcept___">Template
+ Class <code class="computeroutput"><span class="identifier">TimedLockableConcept</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_concept_hpp.template_class__sharelockableconcept___">Template
+ Class <code class="computeroutput"><span class="identifier">ShareLockableConcept</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_concept_hpp.template_class__upgradelockableconcept___">Template
+ Class <code class="computeroutput"><span class="identifier">UpgradeLockableConcept</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lock_generator_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">lock_generator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lock_generator_hpp.metafunction__default_lifetime___">Metafunction
+ <code class="computeroutput"><span class="identifier">default_lifetime</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lock_generator_hpp.metafunction__find_best_lock___">Metafunction
+ <code class="computeroutput"><span class="identifier">find_best_lock</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_adapter_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">lockable_adapter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_adapter_hpp.template_class__exclusive_lockable_adapter___">Template
+ Class <code class="computeroutput"><span class="identifier">exclusive_lockable_adapter</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_adapter_hpp.template_class__timed_lockable_adapter___">Template
+ Class <code class="computeroutput"><span class="identifier">timed_lockable_adapter</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_adapter_hpp.template_class__shared_lockable_adapter___">Template
+ Class <code class="computeroutput"><span class="identifier">shared_lockable_adapter</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_adapter_hpp.template_class__upgrade_lockable_adapter___">Template
+ Class <code class="computeroutput"><span class="identifier">upgrade_lockable_adapter</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+</dl></dd>
+</dl></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.lockables.lockable_traits_hpp"></a><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp" title="
+ Header &lt;boost/synchro/lockable_traits.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">lockable_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.template_class__has_timed_interface_">Template
+ Class <code class="computeroutput"><span class="identifier">has_timed_interface</span></code></a></span></dt>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.class__is_exclusive_">Class
+ <code class="computeroutput"><span class="identifier">is_exclusive</span></code></a></span></dt>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.class__is_shared_">Class
+ <code class="computeroutput"><span class="identifier">is_shared</span></code></a></span></dt>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.class__is_recursive_">Class
+ <code class="computeroutput"><span class="identifier">is_recursive</span></code></a></span></dt>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.class__is_mono_threaded_">Class
+ <code class="computeroutput"><span class="identifier">is_mono_threaded</span></code></a></span></dt>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.class__is_multi_threaded_">Class
+ <code class="computeroutput"><span class="identifier">is_multi_threaded</span></code></a></span></dt>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.class__is_multi_process_">Class
+ <code class="computeroutput"><span class="identifier">is_multi_process</span></code></a></span></dt>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.class__mutex_type_">Class
+ <code class="computeroutput"><span class="identifier">mutex_type</span></code></a></span></dt>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.class__scoped_lock_">Class
+ <code class="computeroutput"><span class="identifier">scoped_lock</span></code></a></span></dt>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.class__unique_lock_">Class
+ <code class="computeroutput"><span class="identifier">unique_lock</span></code></a></span></dt>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.class__shared_lock_">Class
+ <code class="computeroutput"><span class="identifier">shared_lock</span></code></a></span></dt>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.class__upgrade_lock_">Class
+ <code class="computeroutput"><span class="identifier">upgrade_lock</span></code></a></span></dt>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.class__lock_error_">Class
+ <code class="computeroutput"><span class="identifier">lock_error</span></code></a></span></dt>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.class__moved_object_">Class
+ <code class="computeroutput"><span class="identifier">moved_object</span></code></a></span></dt>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.class__lock_error2_">Class
+ <code class="computeroutput"><span class="identifier">lock_error2</span></code></a></span></dt>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.class__lock_error3_">Class
+ <code class="computeroutput"><span class="identifier">lock_error3</span></code></a></span></dt>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.class__lock_error4_">Class
+ <code class="computeroutput"><span class="identifier">lock_error4</span></code></a></span></dt>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.class__lock_traits_">Class
+ <code class="computeroutput"><span class="identifier">lock_traits</span></code></a></span></dt>
+</dl></div>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">synchro</span> <span class="special">{</span>
+
+ <span class="keyword">struct</span> <span class="identifier">mono_threaded_tag</span><span class="special">;</span>
+ <span class="keyword">struct</span> <span class="identifier">multi_threaded_tag</span><span class="special">;</span>
+ <span class="keyword">struct</span> <span class="identifier">multi_process_tag</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">scope_tag</span><span class="special">;</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">is_mono_threaded</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">is_multi_threaded</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">is_multi_process</span><span class="special">;</span>
+
+ <span class="keyword">struct</span> <span class="identifier">process_lifetime_tag</span><span class="special">;</span>
+ <span class="keyword">struct</span> <span class="identifier">kernel_lifetime_tag</span><span class="special">;</span>
+ <span class="keyword">struct</span> <span class="identifier">filesystem_lifetime_tag</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">lifetime_tag</span><span class="special">;</span>
+
+ <span class="keyword">struct</span> <span class="identifier">anonymous_tag</span><span class="special">;</span>
+ <span class="keyword">struct</span> <span class="identifier">named_tag</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">naming_tag</span><span class="special">;</span>
+
+ <span class="keyword">struct</span> <span class="identifier">exclusive_lock_tag</span><span class="special">;</span>
+ <span class="keyword">struct</span> <span class="identifier">sharable_lock_tag</span><span class="special">;</span>
+ <span class="keyword">struct</span> <span class="identifier">upgradable_lock_tag</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">category_tag</span><span class="special">;</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">is_exclusive_lock</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">is_sharable_lock</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">is_upgradable_lock</span><span class="special">;</span>
+
+ <span class="keyword">struct</span> <span class="identifier">non_recursive_tag</span><span class="special">;</span>
+ <span class="keyword">struct</span> <span class="identifier">recursive_tag</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">reentrancy_tag</span><span class="special">;</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">is_recursive_lock</span><span class="special">;</span>
+
+ <span class="keyword">struct</span> <span class="identifier">hasnt_timed_interface_tag</span><span class="special">;</span>
+ <span class="keyword">struct</span> <span class="identifier">has_timed_interface_tag</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">timed_interface_tag</span><span class="special">;</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">has_timed_interface</span><span class="special">;</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Locker</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">lockable_type</span><span class="special">;</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">best_condition</span><span class="special">;</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">best_condition_any</span><span class="special">;</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">scoped_lock_type</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">unique_lock_type</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">shared_lock_type</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">upgrade_lock_type</span><span class="special">;</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">lock_error_type</span><span class="special">;</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">move_object_type</span><span class="special">;</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">defer_lock_type</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">adopt_lock_type</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">try_to_lock_type</span><span class="special">;</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Scope</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">default_lifetime</span><span class="special">;</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">Scope</span><span class="special">=</span><span class="identifier">multi_threaded_tag</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">Cathegory</span><span class="special">=</span><span class="identifier">exclusive_lock_tag</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">Reentrancy</span><span class="special">=</span><span class="identifier">non_recursive_tag</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">TimedInterface</span><span class="special">=</span><span class="identifier">has_timed_interface_tag</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">Lifetime</span><span class="special">=</span><span class="keyword">typename</span> <span class="identifier">default_lifetime</span><span class="special">&lt;</span><span class="identifier">Scope</span><span class="special">&gt;,</span>
+ <span class="keyword">typename</span> <span class="identifier">Naming</span><span class="special">=</span><span class="identifier">anonymous_tag</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">Base</span><span class="special">=</span><span class="keyword">void</span>
+ <span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">lock_traits_base</span><span class="special">;</span>
+
+<span class="special">}}</span>
+</pre>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.lockables.lockable_traits_hpp.template_class__has_timed_interface_"></a><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.template_class__has_timed_interface_" title="Template
+ Class has_timed_interface">Template
+ Class <code class="computeroutput"><span class="identifier">has_timed_interface</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">has_timed_interface</span>
+ <span class="special">:</span> <span class="identifier">is_same_or_is_base_and_derived</span><span class="special">&lt;</span>
+ <span class="identifier">has_timed_interface_tag</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">timed_interface_tag</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="special">&gt;</span>
+<span class="special">{};</span>
+</pre>
+<p>
+ <span class="bold"><strong>Synopsis</strong></span> <span class="bold"><strong>Description</strong></span>
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.lockables.lockable_traits_hpp.class__is_exclusive_"></a><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.class__is_exclusive_" title="Class
+ is_exclusive">Class
+ <code class="computeroutput"><span class="identifier">is_exclusive</span></code></a>
+</h5></div></div></div>
+<p>
+ <span class="bold"><strong>Synopsis</strong></span> <span class="bold"><strong>Description</strong></span>
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.lockables.lockable_traits_hpp.class__is_shared_"></a><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.class__is_shared_" title="Class
+ is_shared">Class
+ <code class="computeroutput"><span class="identifier">is_shared</span></code></a>
+</h5></div></div></div>
+<p>
+ <span class="bold"><strong>Synopsis</strong></span> <span class="bold"><strong>Description</strong></span>
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.lockables.lockable_traits_hpp.class__is_recursive_"></a><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.class__is_recursive_" title="Class
+ is_recursive">Class
+ <code class="computeroutput"><span class="identifier">is_recursive</span></code></a>
+</h5></div></div></div>
+<p>
+ <span class="bold"><strong>Synopsis</strong></span> <span class="bold"><strong>Description</strong></span>
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.lockables.lockable_traits_hpp.class__is_mono_threaded_"></a><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.class__is_mono_threaded_" title="Class
+ is_mono_threaded">Class
+ <code class="computeroutput"><span class="identifier">is_mono_threaded</span></code></a>
+</h5></div></div></div>
+<p>
+ <span class="bold"><strong>Synopsis</strong></span> <span class="bold"><strong>Description</strong></span>
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.lockables.lockable_traits_hpp.class__is_multi_threaded_"></a><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.class__is_multi_threaded_" title="Class
+ is_multi_threaded">Class
+ <code class="computeroutput"><span class="identifier">is_multi_threaded</span></code></a>
+</h5></div></div></div>
+<p>
+ <span class="bold"><strong>Synopsis</strong></span> <span class="bold"><strong>Description</strong></span>
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.lockables.lockable_traits_hpp.class__is_multi_process_"></a><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.class__is_multi_process_" title="Class
+ is_multi_process">Class
+ <code class="computeroutput"><span class="identifier">is_multi_process</span></code></a>
+</h5></div></div></div>
+<p>
+ <span class="bold"><strong>Synopsis</strong></span> <span class="bold"><strong>Description</strong></span>
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.lockables.lockable_traits_hpp.class__mutex_type_"></a><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.class__mutex_type_" title="Class
+ mutex_type">Class
+ <code class="computeroutput"><span class="identifier">mutex_type</span></code></a>
+</h5></div></div></div>
+<p>
+ <span class="bold"><strong>Synopsis</strong></span> <span class="bold"><strong>Description</strong></span>
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.lockables.lockable_traits_hpp.class__scoped_lock_"></a><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.class__scoped_lock_" title="Class
+ scoped_lock">Class
+ <code class="computeroutput"><span class="identifier">scoped_lock</span></code></a>
+</h5></div></div></div>
+<p>
+ <span class="bold"><strong>Synopsis</strong></span> <span class="bold"><strong>Description</strong></span>
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.lockables.lockable_traits_hpp.class__unique_lock_"></a><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.class__unique_lock_" title="Class
+ unique_lock">Class
+ <code class="computeroutput"><span class="identifier">unique_lock</span></code></a>
+</h5></div></div></div>
+<p>
+ <span class="bold"><strong>Synopsis</strong></span> <span class="bold"><strong>Description</strong></span>
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.lockables.lockable_traits_hpp.class__shared_lock_"></a><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.class__shared_lock_" title="Class
+ shared_lock">Class
+ <code class="computeroutput"><span class="identifier">shared_lock</span></code></a>
+</h5></div></div></div>
+<p>
+ <span class="bold"><strong>Synopsis</strong></span> <span class="bold"><strong>Description</strong></span>
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.lockables.lockable_traits_hpp.class__upgrade_lock_"></a><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.class__upgrade_lock_" title="Class
+ upgrade_lock">Class
+ <code class="computeroutput"><span class="identifier">upgrade_lock</span></code></a>
+</h5></div></div></div>
+<p>
+ <span class="bold"><strong>Synopsis</strong></span> <span class="bold"><strong>Description</strong></span>
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.lockables.lockable_traits_hpp.class__lock_error_"></a><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.class__lock_error_" title="Class
+ lock_error">Class
+ <code class="computeroutput"><span class="identifier">lock_error</span></code></a>
+</h5></div></div></div>
+<p>
+ <span class="bold"><strong>Synopsis</strong></span> <span class="bold"><strong>Description</strong></span>
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.lockables.lockable_traits_hpp.class__moved_object_"></a><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.class__moved_object_" title="Class
+ moved_object">Class
+ <code class="computeroutput"><span class="identifier">moved_object</span></code></a>
+</h5></div></div></div>
+<p>
+ <span class="bold"><strong>Synopsis</strong></span> <span class="bold"><strong>Description</strong></span>
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.lockables.lockable_traits_hpp.class__lock_error2_"></a><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.class__lock_error2_" title="Class
+ lock_error2">Class
+ <code class="computeroutput"><span class="identifier">lock_error2</span></code></a>
+</h5></div></div></div>
+<p>
+ <span class="bold"><strong>Synopsis</strong></span> <span class="bold"><strong>Description</strong></span>
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.lockables.lockable_traits_hpp.class__lock_error3_"></a><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.class__lock_error3_" title="Class
+ lock_error3">Class
+ <code class="computeroutput"><span class="identifier">lock_error3</span></code></a>
+</h5></div></div></div>
+<p>
+ <span class="bold"><strong>Synopsis</strong></span> <span class="bold"><strong>Description</strong></span>
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.lockables.lockable_traits_hpp.class__lock_error4_"></a><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.class__lock_error4_" title="Class
+ lock_error4">Class
+ <code class="computeroutput"><span class="identifier">lock_error4</span></code></a>
+</h5></div></div></div>
+<p>
+ <span class="bold"><strong>Synopsis</strong></span> <span class="bold"><strong>Description</strong></span>
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.lockables.lockable_traits_hpp.class__lock_traits_"></a><a href="lockables.html#boost_synchro.reference.lockables.lockable_traits_hpp.class__lock_traits_" title="Class
+ lock_traits">Class
+ <code class="computeroutput"><span class="identifier">lock_traits</span></code></a>
+</h5></div></div></div>
+<p>
+ <span class="bold"><strong>Synopsis</strong></span>
+ </p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">lock_traits</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">Lockable</span> <span class="identifier">mutex_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">unspecified</span> <span class="identifier">scoped_lock</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">unspecified</span> <span class="identifier">unique_lock</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">unspecified</span> <span class="identifier">shared_lock</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">unspecified</span> <span class="identifier">upgrade_lock</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">unspecified</span> <span class="identifier">lock_error</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">unspecified</span> <span class="identifier">moved_object</span><span class="special">;</span>
+ <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">unspecified</span> <span class="identifier">defer_lock</span><span class="special">();</span>
+ <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">unspecified</span> <span class="identifier">adopt_lock</span><span class="special">();</span>
+ <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">unspecified</span> <span class="identifier">try_to_lock</span><span class="special">();</span>
+<span class="special">};</span>
+</pre>
+<p>
+ <span class="bold"><strong>Description</strong></span> Lock Traits characterise
+ lockable types.
+ </p>
+<p>
+ <span class="bold"><strong><code class="computeroutput"><span class="identifier">nested_strict_locker</span></code>
+ public member types</strong></span>
+ </p>
+<div class="orderedlist"><ol type="1"><li><code class="computeroutput"><span class="special">;</span></code></li></ol></div>
+</div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.lockables.lockable_concept_hpp"></a><a href="lockables.html#boost_synchro.reference.lockables.lockable_concept_hpp" title="
+ Header &lt;boost/synchro/lockable_concepts.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">lockable_concepts</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_concept_hpp.template_class__lockableconcept___">Template
+ Class <code class="computeroutput"><span class="identifier">LockableConcept</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_concept_hpp.template_class__timedlockableconcept___">Template
+ Class <code class="computeroutput"><span class="identifier">TimedLockableConcept</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_concept_hpp.template_class__sharelockableconcept___">Template
+ Class <code class="computeroutput"><span class="identifier">ShareLockableConcept</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_concept_hpp.template_class__upgradelockableconcept___">Template
+ Class <code class="computeroutput"><span class="identifier">UpgradeLockableConcept</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+</dl></div>
+<p>
+ Lockable concepts.
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">LockableConcept</span><span class="special">;</span>
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">TimedLockableConcept</span><span class="special">;</span>
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">ShareLockableConcept</span><span class="special">;</span>
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">UpgradeLockableConcept</span><span class="special">;</span>
+</pre>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.lockables.lockable_concept_hpp.template_class__lockableconcept___"></a><a href="lockables.html#boost_synchro.reference.lockables.lockable_concept_hpp.template_class__lockableconcept___" title="Template
+ Class LockableConcept&lt;&gt;">Template
+ Class <code class="computeroutput"><span class="identifier">LockableConcept</span><span class="special">&lt;&gt;</span></code></a>
+</h5></div></div></div>
+<p>
+ The boost::mutex and boost:interprocess mutex family classes are a non-polymorphic
+ classes that encapsulates a system primitive and portion of C API. Clearly,
+ many of the synchronisation primitives support common operations, and
+ hence a Concept. The ExclusiveLockable class can be used with the Boost.ConceptCheck
+ in templates that work with a exclusive synchronisation.
+ </p>
+<p>
+ LockableConcept object supports the basic features required to delimit
+ a critical region. Supports the basic lock, unlock and try_lock functions
+ and defines the lock traits
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">LockableConcept</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">category_tag</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">category</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">timed_interface_tag</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">timed_interface</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">reentrancy_tag</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">reentrancy</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">scope_tag</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">scope</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">lifetime_tag</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">lifetime</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">naming_tag</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">naming</span><span class="special">;</span>
+
+ <span class="identifier">BOOST_CONCEPT_USAGE</span><span class="special">(</span><span class="identifier">LockableConcept</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">lockable</span><span class="special">::</span><span class="identifier">lock</span><span class="special">(</span><span class="identifier">l</span><span class="special">);</span>
+ <span class="identifier">lockable</span><span class="special">::</span><span class="identifier">unlock</span><span class="special">(</span><span class="identifier">l</span><span class="special">);</span>
+ <span class="identifier">lockable</span><span class="special">::</span><span class="identifier">try_lock</span><span class="special">(</span><span class="identifier">l</span><span class="special">);</span>
+ <span class="special">}</span>
+ <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">l</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.lockables.lockable_concept_hpp.template_class__timedlockableconcept___"></a><a href="lockables.html#boost_synchro.reference.lockables.lockable_concept_hpp.template_class__timedlockableconcept___" title="Template
+ Class TimedLockableConcept&lt;&gt;">Template
+ Class <code class="computeroutput"><span class="identifier">TimedLockableConcept</span><span class="special">&lt;&gt;</span></code></a>
+</h5></div></div></div>
+<p>
+ TimedLockableConcept object extends ExclusiveLockConcept with the timed_lock
+ function
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">TimedLockableConcept</span> <span class="special">{</span>
+ <span class="identifier">BOOST_CONCEPT_ASSERT</span><span class="special">((</span><span class="identifier">LockableConcept</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;));</span>
+
+ <span class="identifier">BOOST_CONCEPT_USAGE</span><span class="special">(</span><span class="identifier">TimedLockableConcept</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">lockable</span><span class="special">::</span><span class="identifier">lock_until</span><span class="special">(</span><span class="identifier">l</span><span class="special">,</span> <span class="identifier">t</span><span class="special">);</span>
+ <span class="identifier">lockable</span><span class="special">::</span><span class="identifier">lock_for</span><span class="special">(</span><span class="identifier">l</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">seconds</span><span class="special">(</span><span class="number">1</span><span class="special">));</span>
+ <span class="identifier">lockable</span><span class="special">::</span><span class="identifier">try_lock_until</span><span class="special">(</span><span class="identifier">l</span><span class="special">,</span> <span class="identifier">t</span><span class="special">);</span>
+ <span class="identifier">lockable</span><span class="special">::</span><span class="identifier">try_lock_for</span><span class="special">(</span><span class="identifier">l</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">seconds</span><span class="special">(</span><span class="number">1</span><span class="special">));</span>
+ <span class="special">}</span>
+ <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">l</span><span class="special">;</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">system_clock</span><span class="special">::</span><span class="identifier">time_point</span> <span class="identifier">t</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.lockables.lockable_concept_hpp.template_class__sharelockableconcept___"></a><a href="lockables.html#boost_synchro.reference.lockables.lockable_concept_hpp.template_class__sharelockableconcept___" title="Template
+ Class ShareLockableConcept&lt;&gt;">Template
+ Class <code class="computeroutput"><span class="identifier">ShareLockableConcept</span><span class="special">&lt;&gt;</span></code></a>
+</h5></div></div></div>
+<p>
+ ShareLockableConcept object extends ExclusiveTimedLockConcept with the
+ lock_shared, timed_lock_shared, try_lock_shared and unlock_shared functions
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">ShareLockableConcept</span> <span class="special">{</span>
+ <span class="identifier">BOOST_CONCEPT_ASSERT</span><span class="special">((</span><span class="identifier">TimedLockableConcept</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;));</span>
+
+ <span class="identifier">BOOST_CONCEPT_USAGE</span><span class="special">(</span><span class="identifier">ShareLockableConcept</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">lockable</span><span class="special">::</span><span class="identifier">lock_shared</span><span class="special">(</span><span class="identifier">l</span><span class="special">);</span>
+ <span class="identifier">lockable</span><span class="special">::</span><span class="identifier">lock_shared_until</span><span class="special">(</span><span class="identifier">l</span><span class="special">,</span> <span class="identifier">t</span><span class="special">);</span>
+ <span class="identifier">lockable</span><span class="special">::</span><span class="identifier">lock_shared_for</span><span class="special">(</span><span class="identifier">l</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">seconds</span><span class="special">(</span><span class="number">1</span><span class="special">));</span>
+ <span class="identifier">lockable</span><span class="special">::</span><span class="identifier">try_lock_shared</span><span class="special">(</span><span class="identifier">l</span><span class="special">);</span>
+ <span class="identifier">lockable</span><span class="special">::</span><span class="identifier">try_lock_shared_until</span><span class="special">(</span><span class="identifier">l</span><span class="special">,</span> <span class="identifier">t</span><span class="special">);</span>
+ <span class="identifier">lockable</span><span class="special">::</span><span class="identifier">try_lock_shared_for</span><span class="special">(</span><span class="identifier">l</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">seconds</span><span class="special">(</span><span class="number">1</span><span class="special">));</span>
+ <span class="identifier">lockable</span><span class="special">::</span><span class="identifier">unlock_shared</span><span class="special">(</span><span class="identifier">l</span><span class="special">);</span>
+ <span class="special">}</span>
+ <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">l</span><span class="special">;</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">system_clock</span><span class="special">::</span><span class="identifier">time_point</span> <span class="identifier">t</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.lockables.lockable_concept_hpp.template_class__upgradelockableconcept___"></a><a href="lockables.html#boost_synchro.reference.lockables.lockable_concept_hpp.template_class__upgradelockableconcept___" title="Template
+ Class UpgradeLockableConcept&lt;&gt;">Template
+ Class <code class="computeroutput"><span class="identifier">UpgradeLockableConcept</span><span class="special">&lt;&gt;</span></code></a>
+</h5></div></div></div>
+<p>
+ UpgradeLockableConcept object extends SharableLockableConcept with the
+ lock_upgrade, timed_lock_upgrade, unlock_upgrade_and_lock, unlock_and_lock_shared
+ and unlock_upgrade_and_lock_shared functions.
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">UpgradeLockableConcept</span> <span class="special">{</span>
+ <span class="identifier">BOOST_CONCEPT_ASSERT</span><span class="special">((</span><span class="identifier">ShareLockableConcept</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;));</span>
+
+ <span class="identifier">BOOST_CONCEPT_USAGE</span><span class="special">(</span><span class="identifier">UpgradeLockableConcept</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">lockable</span><span class="special">::</span><span class="identifier">lock_upgrade</span><span class="special">(</span><span class="identifier">l</span><span class="special">);</span>
+ <span class="comment">//lockable::lock_upgrade_until(l, t);
+</span> <span class="comment">//lockable::lock_upgrade_for(l, boost::chrono::seconds(1));
+</span> <span class="identifier">lockable</span><span class="special">::</span><span class="identifier">try_lock_upgrade</span><span class="special">(</span><span class="identifier">l</span><span class="special">);</span>
+ <span class="comment">//lockable::try_lock_upgrade_until(l, t);
+</span> <span class="comment">//lockable::try_lock_upgrade_for(l,boost::chrono::seconds(1));
+</span> <span class="identifier">lockable</span><span class="special">::</span><span class="identifier">unlock_upgrade_and_lock</span><span class="special">(</span><span class="identifier">l</span><span class="special">);</span>
+ <span class="identifier">lockable</span><span class="special">::</span><span class="identifier">unlock_and_lock_upgrade</span><span class="special">(</span><span class="identifier">l</span><span class="special">);</span>
+ <span class="identifier">lockable</span><span class="special">::</span><span class="identifier">unlock_and_lock_shared</span><span class="special">(</span><span class="identifier">l</span><span class="special">);</span>
+ <span class="identifier">lockable</span><span class="special">::</span><span class="identifier">unlock_upgrade_and_lock_shared</span><span class="special">(</span><span class="identifier">l</span><span class="special">);</span>
+ <span class="special">}</span>
+ <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">l</span><span class="special">;</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">system_clock</span><span class="special">::</span><span class="identifier">time_point</span> <span class="identifier">t</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+</div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.lockables.lock_generator_hpp"></a><a href="lockables.html#boost_synchro.reference.lockables.lock_generator_hpp" title="
+ Header &lt;boost/synchro/lock_generator.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">lock_generator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lock_generator_hpp.metafunction__default_lifetime___">Metafunction
+ <code class="computeroutput"><span class="identifier">default_lifetime</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lock_generator_hpp.metafunction__find_best_lock___">Metafunction
+ <code class="computeroutput"><span class="identifier">find_best_lock</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+</dl></div>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">synchro</span> <span class="special">{</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Scope</span><span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">default_lifetime</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">see_below</span> <span class="identifier">type</span><span class="special">;</span>
+ <span class="special">}</span>
+ <span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">Scope</span><span class="special">=</span><span class="identifier">multi_threaded_tag</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">Category</span><span class="special">=</span><span class="identifier">exclusive_lock_tag</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">Reentrancy</span><span class="special">=</span><span class="identifier">non_recursive_tag</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">TimedInterface</span><span class="special">=</span><span class="identifier">has_timed_interface_tag</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">Lifetime</span><span class="special">=</span><span class="keyword">typename</span> <span class="identifier">default_lifetime</span><span class="special">&lt;</span><span class="identifier">Scope</span><span class="special">&gt;,</span>
+ <span class="keyword">typename</span> <span class="identifier">Naming</span><span class="special">=</span><span class="identifier">anonymous_tag</span>
+ <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">find_best_lock</span><span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">see_below</span> <span class="identifier">type</span><span class="special">;</span>
+ <span class="special">}</span>
+<span class="special">}}</span>
+</pre>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.lockables.lock_generator_hpp.metafunction__default_lifetime___"></a><a href="lockables.html#boost_synchro.reference.lockables.lock_generator_hpp.metafunction__default_lifetime___" title="Metafunction
+ default_lifetime&lt;&gt;">Metafunction
+ <code class="computeroutput"><span class="identifier">default_lifetime</span><span class="special">&lt;&gt;</span></code></a>
+</h5></div></div></div>
+<p>
+ Metafunction that returns the default lifetime depending on the Scope.
+ </p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Scope</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">default_lifetime</span><span class="special">;</span>
+<span class="keyword">template</span><span class="special">&lt;&gt;</span> <span class="keyword">struct</span> <span class="identifier">default_lifetime</span><span class="special">&lt;</span><span class="identifier">multi_threaded_tag</span><span class="special">&gt;</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">process_lifetime_tag</span> <span class="identifier">type</span><span class="special">;</span>
+<span class="special">};</span>
+<span class="keyword">template</span><span class="special">&lt;&gt;</span> <span class="keyword">struct</span> <span class="identifier">default_lifetime</span><span class="special">&lt;</span><span class="identifier">multi_process_tag</span><span class="special">&gt;</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">kernel_lifetime_tag</span> <span class="identifier">type</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+<div class="variablelist">
+<p class="title"><b></b></p>
+<dl>
+<dt><span class="term">Expression:</span></dt>
+<dd><p>
+ default_lifetime&lt;Scope&gt;::type
+ </p></dd>
+<dt><span class="term">Return type:</span></dt>
+<dd><p>
+ A lifetime tag.
+ </p></dd>
+<dt><span class="term">Complexity:</span></dt>
+<dd><p>
+ constant.
+ </p></dd>
+</dl>
+</div>
+<div class="table">
+<a name="id4854904"></a><p class="title"><b>Table 1.1. default_lifetime relationship</b></p>
+<table class="table" summary="default_lifetime relationship">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ <span class="bold"><strong><code class="computeroutput"><span class="identifier">Scope</span></code></strong></span>
+ </p>
+ </th>
+<th>
+ <p>
+ <span class="bold"><strong><code class="computeroutput"><span class="identifier">default_lifetime</span><span class="special">&lt;</span><span class="identifier">Scope</span><span class="special">&gt;::</span><span class="identifier">type</span></code></strong></span>
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">multi_threaded_tag</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">process_lifetime_tag</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">multi_process_tag</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">kernel_lifetime_tag</span></code>
+ </p>
+ </td>
+</tr>
+</tbody>
+</table>
+</div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.lockables.lock_generator_hpp.metafunction__find_best_lock___"></a><a href="lockables.html#boost_synchro.reference.lockables.lock_generator_hpp.metafunction__find_best_lock___" title="Metafunction
+ find_best_lock&lt;&gt;">Metafunction
+ <code class="computeroutput"><span class="identifier">find_best_lock</span><span class="special">&lt;&gt;</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">Scope</span><span class="special">=</span><span class="identifier">multi_threaded_tag</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">Category</span><span class="special">=</span><span class="identifier">exclusive_lock_tag</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">Reentrancy</span><span class="special">=</span><span class="identifier">non_recursive_tag</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">TimedInterface</span><span class="special">=</span><span class="identifier">has_timed_interface_tag</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">Lifetime</span><span class="special">=</span><span class="keyword">typename</span> <span class="identifier">default_lifetime</span><span class="special">&lt;</span><span class="identifier">Scope</span><span class="special">&gt;,</span>
+ <span class="keyword">typename</span> <span class="identifier">Naming</span><span class="special">=</span><span class="identifier">anonymous_tag</span>
+<span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">find_best_lock</span><span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">see_below</span> <span class="identifier">type</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<div class="variablelist">
+<p class="title"><b></b></p>
+<dl>
+<dt><span class="term">Expression:</span></dt>
+<dd><p>
+ find_best_lock&lt;...&gt;::type
+ </p></dd>
+<dt><span class="term">Return type:</span></dt>
+<dd><p>
+ A model of <code class="computeroutput"><span class="identifier">Lockable</span></code>.
+ </p></dd>
+<dt><span class="term">Complexity:</span></dt>
+<dd><p>
+ constant.
+ </p></dd>
+</dl>
+</div>
+<p>
+ The library defines already the following matchings:
+ </p>
+<div class="table">
+<a name="id4855382"></a><p class="title"><b>Table 1.2. find_best_lock relationship</b></p>
+<table class="table" summary="find_best_lock relationship">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ <span class="bold"><strong><code class="computeroutput"><span class="identifier">Scope</span></code></strong></span>
+ </p>
+ </th>
+<th>
+ <p>
+ <span class="bold"><strong><code class="computeroutput"><span class="identifier">Category</span></code></strong></span>
+ </p>
+ </th>
+<th>
+ <p>
+ <span class="bold"><strong><code class="computeroutput"><span class="identifier">Reentrancy</span></code></strong></span>
+ </p>
+ </th>
+<th>
+ <p>
+ <span class="bold"><strong><code class="computeroutput"><span class="identifier">TimedInterface</span></code></strong></span>
+ </p>
+ </th>
+<th>
+ <p>
+ <span class="bold"><strong><code class="computeroutput"><span class="identifier">Lifetime</span></code></strong></span>
+ </p>
+ </th>
+<th>
+ <p>
+ <span class="bold"><strong><code class="computeroutput"><span class="identifier">Naming</span></code></strong></span>
+ </p>
+ </th>
+<th>
+ <p>
+ <span class="bold"><strong><code class="computeroutput"><span class="identifier">find_best_lock</span><span class="special">&lt;...&gt;::</span><span class="identifier">type</span></code></strong></span>
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">multi_threaded_tag</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">exclusive_lock_tag</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">non_recursive_tag</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">hasnt_timed_interface_tag</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">process_lifetime_tag</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">anonymous_tag</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">synchro</span><span class="special">::</span><span class="identifier">thread_mutex</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">multi_threaded_tag</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">exclusive_lock_tag</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">recursive_tag</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">hasnt_timed_interface_tag</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">process_lifetime_tag</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">anonymous_tag</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">synchro</span><span class="special">::</span><span class="identifier">thread_recursive_mutex</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">multi_threaded_tag</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">exclusive_lock_tag</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">non_recursive_tag</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">has_timed_interface_tag</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">process_lifetime_tag</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">anonymous_tag</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">synchro</span><span class="special">::</span><span class="identifier">thread_timed_mutex</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">multi_threaded_tag</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">*</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">non_recursive_tag</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">*</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">process_lifetime_tag</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">anonymous_tag</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">synchro</span><span class="special">::</span><span class="identifier">thread_shared_mutex</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">multi_process_tag</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">exclusive_lock_tag</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">non_recursive_tag</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">*</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">kernel_lifetime_tag</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">anonymous_tag</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">synchro</span><span class="special">::</span><span class="identifier">interprocess_mutex</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">multi_process_tag</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">exclusive_lock_tag</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">recursive_tag</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">*</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">kernel_lifetime_tag</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">anonymous_tag</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">synchro</span><span class="special">::</span><span class="identifier">interprocess_recursive_mutex</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">multi_process_tag</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">*</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">non_recursive_tag</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">*</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">process_lifetime_tag</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">anonymous_tag</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">synchro</span><span class="special">::</span><span class="identifier">interprocess_upgradable_mutex</span></code>
+ </p>
+ </td>
+</tr>
+</tbody>
+</table>
+</div>
+</div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.lockables.lockable_adapter_hpp"></a><a href="lockables.html#boost_synchro.reference.lockables.lockable_adapter_hpp" title="
+ Header &lt;boost/synchro/lockable_adapter.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">lockable_adapter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_adapter_hpp.template_class__exclusive_lockable_adapter___">Template
+ Class <code class="computeroutput"><span class="identifier">exclusive_lockable_adapter</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_adapter_hpp.template_class__timed_lockable_adapter___">Template
+ Class <code class="computeroutput"><span class="identifier">timed_lockable_adapter</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_adapter_hpp.template_class__shared_lockable_adapter___">Template
+ Class <code class="computeroutput"><span class="identifier">shared_lockable_adapter</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="lockables.html#boost_synchro.reference.lockables.lockable_adapter_hpp.template_class__upgrade_lockable_adapter___">Template
+ Class <code class="computeroutput"><span class="identifier">upgrade_lockable_adapter</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+</dl></div>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">synchro</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="keyword">class</span> <span class="identifier">exclusive_lockable_adapter</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">TimedLock</span><span class="special">&gt;</span> <span class="keyword">class</span> <span class="identifier">timed_lockable_adapter</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">SharableLock</span><span class="special">&gt;</span> <span class="keyword">class</span> <span class="identifier">shared_lockable_adapter</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">UpgradableLock</span><span class="special">&gt;</span> <span class="keyword">class</span> <span class="identifier">upgrade_lockable_adapter</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">category</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">timed_interface</span>
+ <span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">lockable_adapter</span><span class="special">;</span>
+<span class="special">}}</span>
+</pre>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.lockables.lockable_adapter_hpp.template_class__exclusive_lockable_adapter___"></a><a href="lockables.html#boost_synchro.reference.lockables.lockable_adapter_hpp.template_class__exclusive_lockable_adapter___" title="Template
+ Class exclusive_lockable_adapter&lt;&gt;">Template
+ Class <code class="computeroutput"><span class="identifier">exclusive_lockable_adapter</span><span class="special">&lt;&gt;</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">exclusive_lockable_adapter</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="identifier">BOOST_COPY_CONSTRUCTOR_DELETE</span><span class="special">(</span><span class="identifier">exclusive_lockable_adapter</span><span class="special">)</span>
+ <span class="identifier">BOOST_COPY_ASSIGNEMENT_DELETE</span><span class="special">(</span><span class="identifier">exclusive_lockable_adapter</span><span class="special">)</span>
+
+ <span class="keyword">typedef</span> <span class="identifier">Lockable</span> <span class="identifier">lockable_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">scope_tag</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">scope</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">category_tag</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">category</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">reentrancy_tag</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">reentrancy</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">timed_interface_tag</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">timed_interface</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">lifetime_tag</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">lifetime</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">naming_tag</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">naming</span><span class="special">;</span>
+
+ <span class="identifier">exclusive_lockable_adapter</span><span class="special">()</span> <span class="special">{}</span>
+ <span class="keyword">void</span> <span class="identifier">lock</span><span class="special">();</span>
+ <span class="keyword">void</span> <span class="identifier">unlock</span><span class="special">();</span>
+ <span class="keyword">bool</span> <span class="identifier">try_lock</span><span class="special">();</span>
+<span class="special">};</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.lockables.lockable_adapter_hpp.template_class__timed_lockable_adapter___"></a><a href="lockables.html#boost_synchro.reference.lockables.lockable_adapter_hpp.template_class__timed_lockable_adapter___" title="Template
+ Class timed_lockable_adapter&lt;&gt;">Template
+ Class <code class="computeroutput"><span class="identifier">timed_lockable_adapter</span><span class="special">&lt;&gt;</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">TimedLock</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">timed_lockable_adapter</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">exclusive_lockable_adapter</span><span class="special">&lt;</span><span class="identifier">TimedLock</span><span class="special">&gt;</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="identifier">timed_lockable_adapter</span><span class="special">()</span> <span class="special">{}</span>
+
+ <span class="keyword">bool</span> <span class="identifier">try_lock_until</span><span class="special">(</span><span class="identifier">system_time</span> <span class="keyword">const</span> <span class="special">&amp;</span> <span class="identifier">abs_time</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">TimeDuration</span><span class="special">&gt;</span>
+ <span class="keyword">bool</span> <span class="identifier">try_lock_for</span><span class="special">(</span><span class="identifier">TimeDuration</span> <span class="keyword">const</span> <span class="special">&amp;</span> <span class="identifier">relative_time</span><span class="special">);</span>
+
+ <span class="keyword">void</span> <span class="identifier">lock_until</span><span class="special">(</span><span class="identifier">system_time</span> <span class="keyword">const</span> <span class="special">&amp;</span> <span class="identifier">abs_time</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">TimeDuration</span><span class="special">&gt;</span>
+ <span class="keyword">void</span> <span class="identifier">lock_for</span><span class="special">(</span><span class="identifier">TimeDuration</span> <span class="keyword">const</span> <span class="special">&amp;</span> <span class="identifier">relative_time</span><span class="special">);</span>
+<span class="special">};</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.lockables.lockable_adapter_hpp.template_class__shared_lockable_adapter___"></a><a href="lockables.html#boost_synchro.reference.lockables.lockable_adapter_hpp.template_class__shared_lockable_adapter___" title="Template
+ Class shared_lockable_adapter&lt;&gt;">Template
+ Class <code class="computeroutput"><span class="identifier">shared_lockable_adapter</span><span class="special">&lt;&gt;</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">SharableLock</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">shared_lockable_adapter</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">timed_lockable_adapter</span><span class="special">&lt;</span><span class="identifier">SharableLock</span><span class="special">&gt;</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="identifier">shared_lockable_adapter</span><span class="special">()</span> <span class="special">{}</span>
+ <span class="keyword">void</span> <span class="identifier">lock_shared</span><span class="special">();</span>
+ <span class="keyword">bool</span> <span class="identifier">try_lock_shared</span><span class="special">();</span>
+ <span class="keyword">void</span> <span class="identifier">unlock_shared</span><span class="special">();</span>
+
+ <span class="keyword">bool</span> <span class="identifier">try_lock_shared_until</span><span class="special">(</span><span class="identifier">system_time</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">t</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">TimeDuration</span><span class="special">&gt;</span>
+ <span class="keyword">bool</span> <span class="identifier">try_lock_shared_for</span><span class="special">(</span><span class="identifier">TimeDuration</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">t</span><span class="special">);</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">TimeDuration</span><span class="special">&gt;</span>
+ <span class="keyword">void</span> <span class="identifier">lock_shared_for</span><span class="special">(</span><span class="identifier">TimeDuration</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">t</span><span class="special">);</span>
+ <span class="keyword">void</span> <span class="identifier">lock_shared_until</span><span class="special">(</span><span class="identifier">system_time</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">t</span><span class="special">);</span>
+<span class="special">};</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.lockables.lockable_adapter_hpp.template_class__upgrade_lockable_adapter___"></a><a href="lockables.html#boost_synchro.reference.lockables.lockable_adapter_hpp.template_class__upgrade_lockable_adapter___" title="Template
+ Class upgrade_lockable_adapter&lt;&gt;">Template
+ Class <code class="computeroutput"><span class="identifier">upgrade_lockable_adapter</span><span class="special">&lt;&gt;</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">UpgradableLock</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">upgrade_lockable_adapter</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">shared_lockable_adapter</span><span class="special">&lt;</span><span class="identifier">UpgradableLock</span><span class="special">&gt;{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="identifier">upgrade_lockable_adapter</span><span class="special">();</span>
+
+ <span class="keyword">void</span> <span class="identifier">lock_upgrade</span><span class="special">();</span>
+ <span class="keyword">bool</span> <span class="identifier">try_lock_upgrade</span><span class="special">();</span>
+ <span class="keyword">void</span> <span class="identifier">unlock_upgrade</span><span class="special">();</span>
+
+ <span class="keyword">void</span> <span class="identifier">unlock_upgrade_and_lock</span><span class="special">();</span>
+ <span class="keyword">void</span> <span class="identifier">unlock_and_lock_upgrade</span><span class="special">();</span>
+ <span class="keyword">void</span> <span class="identifier">unlock_and_lock_shared</span><span class="special">();</span>
+ <span class="keyword">void</span> <span class="identifier">unlock_upgrade_and_lock_shared</span><span class="special">();</span>
+
+ <span class="keyword">bool</span> <span class="identifier">try_lock_upgrade_until</span><span class="special">(</span><span class="identifier">system_time</span> <span class="keyword">const</span><span class="special">&amp;</span><span class="identifier">t</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">TimeDuration</span><span class="special">&gt;</span>
+ <span class="keyword">bool</span> <span class="identifier">try_lock_upgrade_for</span><span class="special">(</span><span class="identifier">TimeDuration</span> <span class="keyword">const</span><span class="special">&amp;</span><span class="identifier">t</span><span class="special">);</span>
+ <span class="keyword">void</span> <span class="identifier">lock_upgrade_until</span><span class="special">(</span><span class="identifier">system_time</span> <span class="keyword">const</span><span class="special">&amp;</span><span class="identifier">t</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">TimeDuration</span><span class="special">&gt;</span>
+ <span class="keyword">void</span> <span class="identifier">lock_upgrade_for</span><span class="special">(</span><span class="identifier">TimeDuration</span> <span class="keyword">const</span><span class="special">&amp;</span><span class="identifier">t</span><span class="special">);</span>
+<span class="special">};</span>
+</pre>
+</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"><div class="copyright-footer">Copyright © 2008 Vicente J. Botet Escriba<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../reference.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="generic_free_functions_on_lockable.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/synchro/libs/synchro/doc/html/boost_synchro/reference/lockers.html
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/html/boost_synchro/reference/lockers.html 2009-10-12 17:49:35 EDT (Mon, 12 Oct 2009)
@@ -0,0 +1,1129 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Lockers</title>
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+<link rel="start" href="../../index.html" title="Chapter 1. Boost.Synchro">
+<link rel="up" href="../reference.html" title="Reference">
+<link rel="prev" href="condition_lockables.html" title="Condition
+ Lockables">
+<link rel="next" href="single_threaded.html" title="Single-threaded">
+</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">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="condition_lockables.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="single_threaded.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_synchro.reference.lockers"></a>Lockers
+</h3></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.locker_concepts_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">locker_concepts</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.locker_concepts_hpp.template_class__basiclockerconcept___">Template
+ Class <code class="computeroutput"><span class="identifier">BasicLockerConcept</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.locker_concepts_hpp.template_class__lockerconcept___">Template
+ Class <code class="computeroutput"><span class="identifier">LockerConcept</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.locker_concepts_hpp.template_class__timedlockerconcept___">Template
+ Class <code class="computeroutput"><span class="identifier">TimedLockerConcept</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.locker_concepts_hpp.template_class__uniquelockerconcept___">Template
+ Class <code class="computeroutput"><span class="identifier">UniqueLockerConcept</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.locker_concepts_hpp.template_class__sharedlockerconcept___">Template
+ Class <code class="computeroutput"><span class="identifier">SharedLockerConcept</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.locker_concepts_hpp.template_class__upgradelockerconcept___">Template
+ Class <code class="computeroutput"><span class="identifier">UpgradeLockerConcept</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.locker_concepts_hpp.template_class__movablelockerconcept___">Template
+ Class <code class="computeroutput"><span class="identifier">MovableLockerConcept</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.is_strict_locker_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">locker</span><span class="special">/</span><span class="identifier">is_strict_locker</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dd><dl><dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.is_strict_locker_hpp.metafunction__is_strict_locker_">Metafunction
+ <code class="computeroutput"><span class="identifier">is_strict_locker</span></code></a></span></dt></dl></dd>
+<dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.strict_locker_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">locker</span><span class="special">/</span><span class="identifier">strict_locker</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.strict_locker_hpp.class__strict_locker_">Class
+ <code class="computeroutput"><span class="identifier">strict_locker</span></code></a></span></dt>
+<dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.strict_locker_hpp.class__nested_strict_locker_">Class
+ <code class="computeroutput"><span class="identifier">nested_strict_locker</span></code></a></span></dt>
+<dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.strict_locker_hpp.template_class__nested_strict_locker_">Template
+ Class <code class="computeroutput"><span class="identifier">nested_strict_locker</span></code></a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.reverse_locker_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">locker</span><span class="special">/</span><span class="identifier">reverse_locker</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dd><dl><dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.reverse_locker_hpp.class__reverse_lock_">Class
+ <code class="computeroutput"><span class="identifier">reverse_lock</span></code></a></span></dt></dl></dd>
+<dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.nested_reverse_locker_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">locker</span><span class="special">/</span><span class="identifier">nested_reverse_locker</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dd><dl><dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.nested_reverse_locker_hpp.class__nested_reverse_locker_">Class
+ <code class="computeroutput"><span class="identifier">nested_reverse_locker</span></code></a></span></dt></dl></dd>
+<dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.condition_locker_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">locker</span><span class="special">/</span><span class="identifier">condition_locker</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.condition_locker_hpp.template_class__condition_backdoor_">Template
+ Class <code class="computeroutput"><span class="identifier">condition_backdoor</span></code></a></span></dt>
+<dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.condition_locker_hpp.template_class__condition_safe_">Template
+ Class <code class="computeroutput"><span class="identifier">condition_safe</span></code></a></span></dt>
+<dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.condition_locker_hpp.template_class__condition_unique_locker_">Template
+ Class <code class="computeroutput"><span class="identifier">condition_unique_locker</span></code></a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.externally_locked_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">locker</span><span class="special">/</span><span class="identifier">externally_locked</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dd><dl><dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.externally_locked_hpp.template_class__externally_locked_">Template
+ Class <code class="computeroutput"><span class="identifier">externally_locked</span></code></a></span></dt></dl></dd>
+<dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.locking_ptr_hpp"> Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">locker</span><span class="special">/</span><span class="identifier">locking_ptr</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.locking_ptr_hpp.class__locking_ptr_">Class
+ <code class="computeroutput"><span class="identifier">locking_ptr</span></code></a></span></dt>
+<dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.locking_ptr_hpp.class__sharable_locking_ptr_">Class
+ <code class="computeroutput"><span class="identifier">sharable_locking_ptr</span></code></a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.on_derreference_locking_ptr_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">locker</span><span class="special">/</span><span class="identifier">on_derreference_locking_ptr</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dd><dl><dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.on_derreference_locking_ptr_hpp.class__on_derreference_locking_ptr_">Class
+ <code class="computeroutput"><span class="identifier">on_derreference_locking_ptr</span></code></a></span></dt></dl></dd>
+<dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.array_unique_locker_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">locker</span><span class="special">/</span><span class="identifier">array_unique_locker</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.array_unique_locker_hpp.template_class__unique_array_locker___">Template
+ Class <code class="computeroutput"><span class="identifier">unique_array_locker</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.array_unique_locker_hpp.template_class__try_unique_array_locker___">Template
+ Class <code class="computeroutput"><span class="identifier">try_unique_array_locker</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+</dl></dd>
+</dl></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.lockers.locker_concepts_hpp"></a><a href="lockers.html#boost_synchro.reference.lockers.locker_concepts_hpp" title="
+ Header &lt;boost/synchro/locker_concepts.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">locker_concepts</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.locker_concepts_hpp.template_class__basiclockerconcept___">Template
+ Class <code class="computeroutput"><span class="identifier">BasicLockerConcept</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.locker_concepts_hpp.template_class__lockerconcept___">Template
+ Class <code class="computeroutput"><span class="identifier">LockerConcept</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.locker_concepts_hpp.template_class__timedlockerconcept___">Template
+ Class <code class="computeroutput"><span class="identifier">TimedLockerConcept</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.locker_concepts_hpp.template_class__uniquelockerconcept___">Template
+ Class <code class="computeroutput"><span class="identifier">UniqueLockerConcept</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.locker_concepts_hpp.template_class__sharedlockerconcept___">Template
+ Class <code class="computeroutput"><span class="identifier">SharedLockerConcept</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.locker_concepts_hpp.template_class__upgradelockerconcept___">Template
+ Class <code class="computeroutput"><span class="identifier">UpgradeLockerConcept</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.locker_concepts_hpp.template_class__movablelockerconcept___">Template
+ Class <code class="computeroutput"><span class="identifier">MovableLockerConcept</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+</dl></div>
+<p>
+ Locker concepts.
+ </p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">synchro</span> <span class="special">{</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Locker</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">BasicLockerConcept</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Locker</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">LockerConcept</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Locker</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">TimedLockerConcept</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Locker</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">UniqueLockerConcept</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Locker</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">SharedLockerConcept</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Locker</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">UpgradeLockerConcept</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Locker</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">MovableLockerConcept</span><span class="special">;</span>
+
+<span class="special">}}</span>
+</pre>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.lockers.locker_concepts_hpp.template_class__basiclockerconcept___"></a><a href="lockers.html#boost_synchro.reference.lockers.locker_concepts_hpp.template_class__basiclockerconcept___" title="Template
+ Class BasicLockerConcept&lt;&gt;">Template
+ Class <code class="computeroutput"><span class="identifier">BasicLockerConcept</span><span class="special">&lt;&gt;</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Locker</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">BasicLockerConcept</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">lockable_type</span><span class="special">&lt;</span><span class="identifier">Locker</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">lockable_type</span><span class="special">;</span>
+
+ <span class="identifier">BOOST_CONCEPT_USAGE</span><span class="special">(</span><span class="identifier">BasicLockerConcept</span><span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">const</span> <span class="identifier">Locker</span> <span class="identifier">l1</span><span class="special">(</span><span class="identifier">mtx_</span><span class="special">);</span>
+ <span class="keyword">if</span> <span class="special">(</span><span class="identifier">l1</span><span class="special">.</span><span class="identifier">is_locking</span><span class="special">(</span><span class="identifier">mtx_</span><span class="special">))</span> <span class="keyword">return</span><span class="special">;</span>
+ <span class="keyword">if</span> <span class="special">(</span><span class="identifier">l1</span><span class="special">.</span><span class="identifier">owns_lock</span><span class="special">())</span> <span class="keyword">return</span><span class="special">;</span>
+ <span class="keyword">if</span> <span class="special">(</span><span class="identifier">l1</span><span class="special">)</span> <span class="keyword">return</span><span class="special">;</span>
+ <span class="keyword">if</span> <span class="special">(!</span><span class="identifier">l1</span><span class="special">)</span> <span class="keyword">return</span><span class="special">;</span>
+ <span class="special">}</span>
+ <span class="identifier">lockable_type</span> <span class="identifier">mtx_</span><span class="special">;</span>
+ <span class="identifier">system_time</span> <span class="identifier">t</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.lockers.locker_concepts_hpp.template_class__lockerconcept___"></a><a href="lockers.html#boost_synchro.reference.lockers.locker_concepts_hpp.template_class__lockerconcept___" title="Template
+ Class LockerConcept&lt;&gt;">Template
+ Class <code class="computeroutput"><span class="identifier">LockerConcept</span><span class="special">&lt;&gt;</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Locker</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">LockerConcept</span> <span class="special">{</span>
+ <span class="identifier">BOOST_CONCEPT_ASSERT</span><span class="special">((</span><span class="identifier">BasicLockerConcept</span><span class="special">&lt;</span><span class="identifier">Locker</span><span class="special">&gt;));</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">lockable_type</span><span class="special">&lt;</span><span class="identifier">Locker</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">lockable_type</span><span class="special">;</span>
+
+ <span class="identifier">BOOST_CONCEPT_USAGE</span><span class="special">(</span><span class="identifier">LockerConcept</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">Locker</span> <span class="identifier">l2</span><span class="special">(</span><span class="identifier">mtx_</span><span class="special">,</span> <span class="identifier">defer_lock</span><span class="special">);</span>
+ <span class="identifier">Locker</span> <span class="identifier">l3</span><span class="special">(</span><span class="identifier">mtx_</span><span class="special">,</span> <span class="identifier">adopt_lock</span><span class="special">);</span>
+ <span class="identifier">Locker</span> <span class="identifier">l4</span><span class="special">(</span><span class="identifier">mtx_</span><span class="special">,</span> <span class="identifier">try_to_lock</span><span class="special">);</span>
+ <span class="identifier">l2</span><span class="special">.</span><span class="identifier">lock</span><span class="special">();</span>
+ <span class="keyword">if</span> <span class="special">(</span><span class="identifier">l2</span><span class="special">.</span><span class="identifier">try_lock</span><span class="special">())</span> <span class="keyword">return</span><span class="special">;</span>
+ <span class="identifier">l2</span><span class="special">.</span><span class="identifier">unlock</span><span class="special">();</span>
+ <span class="identifier">l2</span><span class="special">.</span><span class="identifier">release</span><span class="special">();</span>
+ <span class="special">}</span>
+ <span class="identifier">lockable_type</span> <span class="identifier">mtx_</span><span class="special">;</span>
+ <span class="identifier">system_time</span> <span class="identifier">t</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.lockers.locker_concepts_hpp.template_class__timedlockerconcept___"></a><a href="lockers.html#boost_synchro.reference.lockers.locker_concepts_hpp.template_class__timedlockerconcept___" title="Template
+ Class TimedLockerConcept&lt;&gt;">Template
+ Class <code class="computeroutput"><span class="identifier">TimedLockerConcept</span><span class="special">&lt;&gt;</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Locker</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">TimedLockerConcept</span> <span class="special">{</span>
+ <span class="identifier">BOOST_CONCEPT_ASSERT</span><span class="special">((</span><span class="identifier">LockerConcept</span><span class="special">&lt;</span><span class="identifier">Locker</span><span class="special">&gt;));</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">lockable_type</span><span class="special">&lt;</span><span class="identifier">Locker</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">lockable_type</span><span class="special">;</span>
+
+ <span class="identifier">BOOST_CONCEPT_USAGE</span><span class="special">(</span><span class="identifier">TimedLockerConcept</span><span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">const</span> <span class="identifier">Locker</span> <span class="identifier">l1</span><span class="special">(</span><span class="identifier">mtx_</span><span class="special">);</span>
+ <span class="identifier">Locker</span> <span class="identifier">l5</span><span class="special">(</span><span class="identifier">mtx_</span><span class="special">,</span> <span class="identifier">t</span><span class="special">);</span>
+ <span class="identifier">Locker</span> <span class="identifier">l6</span><span class="special">(</span><span class="identifier">mtx_</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">seconds</span><span class="special">(</span><span class="number">1</span><span class="special">));</span>
+ <span class="identifier">Locker</span> <span class="identifier">l7</span><span class="special">(</span><span class="identifier">t</span><span class="special">,</span> <span class="identifier">mtx_</span><span class="special">);</span>
+ <span class="identifier">Locker</span> <span class="identifier">l8</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">seconds</span><span class="special">(</span><span class="number">1</span><span class="special">),</span> <span class="identifier">mtx_</span><span class="special">);</span>
+ <span class="identifier">l5</span><span class="special">.</span><span class="identifier">lock_until</span><span class="special">(</span><span class="identifier">t</span><span class="special">);</span>
+ <span class="identifier">l5</span><span class="special">.</span><span class="identifier">lock_for</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">seconds</span><span class="special">(</span><span class="number">1</span><span class="special">));</span>
+ <span class="keyword">if</span> <span class="special">(</span><span class="identifier">l5</span><span class="special">.</span><span class="identifier">try_lock_until</span><span class="special">(</span><span class="identifier">t</span><span class="special">))</span> <span class="keyword">return</span><span class="special">;</span>
+ <span class="keyword">if</span> <span class="special">(</span><span class="identifier">l5</span><span class="special">.</span><span class="identifier">try_lock_for</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">seconds</span><span class="special">(</span><span class="number">1</span><span class="special">)))</span> <span class="keyword">return</span><span class="special">;</span>
+ <span class="special">}</span>
+ <span class="identifier">lockable_type</span> <span class="identifier">mtx_</span><span class="special">;</span>
+ <span class="identifier">system_time</span> <span class="identifier">t</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.lockers.locker_concepts_hpp.template_class__uniquelockerconcept___"></a><a href="lockers.html#boost_synchro.reference.lockers.locker_concepts_hpp.template_class__uniquelockerconcept___" title="Template
+ Class UniqueLockerConcept&lt;&gt;">Template
+ Class <code class="computeroutput"><span class="identifier">UniqueLockerConcept</span><span class="special">&lt;&gt;</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Locker</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">UniqueLockerConcept</span> <span class="special">{</span>
+ <span class="identifier">BOOST_CONCEPT_ASSERT</span><span class="special">((</span><span class="identifier">TimedLockerConcept</span><span class="special">&lt;</span><span class="identifier">Locker</span><span class="special">&gt;));</span>
+
+ <span class="identifier">BOOST_CONCEPT_USAGE</span><span class="special">(</span><span class="identifier">UniqueLockerConcept</span><span class="special">)</span> <span class="special">{</span>
+ <span class="special">}</span>
+<span class="special">};</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.lockers.locker_concepts_hpp.template_class__sharedlockerconcept___"></a><a href="lockers.html#boost_synchro.reference.lockers.locker_concepts_hpp.template_class__sharedlockerconcept___" title="Template
+ Class SharedLockerConcept&lt;&gt;">Template
+ Class <code class="computeroutput"><span class="identifier">SharedLockerConcept</span><span class="special">&lt;&gt;</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Locker</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">SharedLockerConcept</span> <span class="special">{</span>
+ <span class="identifier">BOOST_CONCEPT_ASSERT</span><span class="special">((</span><span class="identifier">TimedLockerConcept</span><span class="special">&lt;</span><span class="identifier">Locker</span><span class="special">&gt;));</span>
+
+ <span class="identifier">BOOST_CONCEPT_USAGE</span><span class="special">(</span><span class="identifier">SharedLockerConcept</span><span class="special">)</span> <span class="special">{</span>
+ <span class="special">}</span>
+<span class="special">};</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.lockers.locker_concepts_hpp.template_class__upgradelockerconcept___"></a><a href="lockers.html#boost_synchro.reference.lockers.locker_concepts_hpp.template_class__upgradelockerconcept___" title="Template
+ Class UpgradeLockerConcept&lt;&gt;">Template
+ Class <code class="computeroutput"><span class="identifier">UpgradeLockerConcept</span><span class="special">&lt;&gt;</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Locker</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">UpgradeLockerConcept</span> <span class="special">{</span>
+ <span class="identifier">BOOST_CONCEPT_ASSERT</span><span class="special">((</span><span class="identifier">TimedLockerConcept</span><span class="special">&lt;</span><span class="identifier">Locker</span><span class="special">&gt;));</span>
+
+ <span class="identifier">BOOST_CONCEPT_USAGE</span><span class="special">(</span><span class="identifier">UpgradeLockerConcept</span><span class="special">)</span> <span class="special">{</span>
+ <span class="special">}</span>
+<span class="special">};</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.lockers.locker_concepts_hpp.template_class__movablelockerconcept___"></a><a href="lockers.html#boost_synchro.reference.lockers.locker_concepts_hpp.template_class__movablelockerconcept___" title="Template
+ Class MovableLockerConcept&lt;&gt;">Template
+ Class <code class="computeroutput"><span class="identifier">MovableLockerConcept</span><span class="special">&lt;&gt;</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Locker</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">MovableLockerConcept</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">lockable_type</span><span class="special">&lt;</span><span class="identifier">Locker</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">lockable_type</span><span class="special">;</span>
+ <span class="identifier">BOOST_CONCEPT_ASSERT</span><span class="special">((</span><span class="identifier">LockerConcept</span><span class="special">&lt;</span><span class="identifier">lockable_type</span><span class="special">&gt;));</span>
+
+ <span class="identifier">BOOST_CONCEPT_USAGE</span><span class="special">(</span><span class="identifier">MovableLockerConcept</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">Locker</span> <span class="identifier">l1</span><span class="special">(</span><span class="identifier">mtx_</span><span class="special">);</span>
+ <span class="identifier">Locker</span><span class="special">&amp;</span> <span class="identifier">l2</span><span class="special">(</span><span class="identifier">l1</span><span class="special">);</span>
+ <span class="identifier">Locker</span> <span class="identifier">l3</span><span class="special">(</span><span class="identifier">l1</span><span class="special">.</span><span class="identifier">move</span><span class="special">());</span>
+ <span class="identifier">BOOST_ASSERT</span><span class="special">((</span><span class="identifier">l2</span><span class="special">.</span><span class="identifier">mutex</span><span class="special">()!=&amp;</span><span class="identifier">mtx_</span><span class="special">));</span>
+ <span class="identifier">l3</span><span class="special">.</span><span class="identifier">lock</span><span class="special">();</span>
+ <span class="identifier">l2</span> <span class="special">=</span> <span class="identifier">l3</span><span class="special">.</span><span class="identifier">move</span><span class="special">();</span>
+ <span class="special">}</span>
+ <span class="identifier">lockable_type</span> <span class="identifier">mtx_</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+</div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.lockers.is_strict_locker_hpp"></a><a href="lockers.html#boost_synchro.reference.lockers.is_strict_locker_hpp" title="
+ Header &lt;boost/synchro/locker/is_strict_locker.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">locker</span><span class="special">/</span><span class="identifier">is_strict_locker</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl><dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.is_strict_locker_hpp.metafunction__is_strict_locker_">Metafunction
+ <code class="computeroutput"><span class="identifier">is_strict_locker</span></code></a></span></dt></dl></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.lockers.is_strict_locker_hpp.metafunction__is_strict_locker_"></a><a href="lockers.html#boost_synchro.reference.lockers.is_strict_locker_hpp.metafunction__is_strict_locker_" title="Metafunction
+ is_strict_locker">Metafunction
+ <code class="computeroutput"><span class="identifier">is_strict_locker</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Locker</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">is_strict_locker</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">unspecified</span> <span class="identifier">value</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+</div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.lockers.strict_locker_hpp"></a><a href="lockers.html#boost_synchro.reference.lockers.strict_locker_hpp" title="
+ Header &lt;boost/synchro/locker/strict_locker.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">locker</span><span class="special">/</span><span class="identifier">strict_locker</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.strict_locker_hpp.class__strict_locker_">Class
+ <code class="computeroutput"><span class="identifier">strict_locker</span></code></a></span></dt>
+<dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.strict_locker_hpp.class__nested_strict_locker_">Class
+ <code class="computeroutput"><span class="identifier">nested_strict_locker</span></code></a></span></dt>
+<dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.strict_locker_hpp.template_class__nested_strict_locker_">Template
+ Class <code class="computeroutput"><span class="identifier">nested_strict_locker</span></code></a></span></dt>
+</dl></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.lockers.strict_locker_hpp.class__strict_locker_"></a><a href="lockers.html#boost_synchro.reference.lockers.strict_locker_hpp.class__strict_locker_" title="Class
+ strict_locker">Class
+ <code class="computeroutput"><span class="identifier">strict_locker</span></code></a>
+</h5></div></div></div>
+<p>
+ <span class="bold"><strong>Synopsis</strong></span>
+ </p>
+<p>
+ namespace boost { namespace synchro {
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Locker</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">StrictLockerConcept</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">lockable_type</span><span class="special">&lt;</span><span class="identifier">Locker</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">lockable_type</span><span class="special">;</span>
+ <span class="identifier">BOOST_STATIC_ASSERT</span><span class="special">((</span><span class="identifier">is_strict_locker</span><span class="special">&lt;</span><span class="identifier">Locker</span><span class="special">&gt;::</span><span class="identifier">value</span><span class="special">));</span>
+
+ <span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">Locker</span><span class="special">&amp;</span> <span class="identifier">l</span> <span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">BOOST_ASSERT</span><span class="special">((</span><span class="identifier">l</span><span class="special">.</span><span class="identifier">is_locking</span><span class="special">(</span><span class="identifier">lock</span><span class="special">)));</span>
+ <span class="special">}</span>
+
+ <span class="identifier">BOOST_CONCEPT_USAGE</span><span class="special">(</span><span class="identifier">StrictLockerConcept</span><span class="special">)</span> <span class="special">{</span>
+ <span class="special">{</span>
+<span class="comment">// Locker l(lock);
+</span><span class="comment">// BOOST_ASSERT((l));
+</span> <span class="special">}</span>
+ <span class="special">}</span>
+ <span class="identifier">lockable_type</span> <span class="identifier">lock</span><span class="special">;</span>
+<span class="special">};</span>
+
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">strict_locker</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">Lockable</span> <span class="identifier">lockable_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">unspecified</span> <span class="identifier">bool_type</span><span class="special">;</span>
+
+ <span class="keyword">explicit</span> <span class="identifier">strict_locker</span><span class="special">(</span><span class="identifier">lockable_type</span><span class="special">&amp;</span> <span class="identifier">obj</span><span class="special">);</span>
+ <span class="special">~</span><span class="identifier">strict_locker</span><span class="special">();</span>
+
+ <span class="keyword">operator</span> <span class="identifier">bool_type</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">!()</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="keyword">bool</span> <span class="identifier">owns_lock</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="identifier">lockable_type</span><span class="special">*</span> <span class="identifier">mutex</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="identifier">BOOST_ADRESS_OF_DELETE</span><span class="special">(</span><span class="identifier">strict_locker</span><span class="special">)</span>
+ <span class="identifier">BOOST_HEAP_ALLOCATION_DELETE</span><span class="special">()</span>
+ <span class="identifier">BOOST_DEFAULT_CONSTRUCTOR_DELETE</span><span class="special">(</span><span class="identifier">strict_locker</span><span class="special">)</span> <span class="comment">/*&lt; disable default construction &gt;*/</span>
+ <span class="identifier">BOOST_COPY_CONSTRUCTOR_DELETE</span><span class="special">(</span><span class="identifier">strict_locker</span><span class="special">)</span> <span class="comment">/*&lt; disable copy construction &gt;*/</span>
+ <span class="identifier">BOOST_COPY_ASSIGNEMENT_DELETE</span><span class="special">(</span><span class="identifier">strict_locker</span><span class="special">)</span> <span class="comment">/*&lt; disable copy asignement &gt;*/</span>
+<span class="special">};</span>
+
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">is_strict_locker</span><span class="special">&lt;</span><span class="identifier">strict_locker</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">:</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span> <span class="special">{};</span>
+
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Locker</span> <span class="special">&gt;</span> <span class="keyword">class</span> <span class="identifier">nested_strict_locker</span> <span class="special">{</span>
+ <span class="identifier">BOOST_CONCEPT_ASSERT</span><span class="special">((</span><span class="identifier">MovableLockerConcept</span><span class="special">&lt;</span><span class="identifier">Locker</span><span class="special">&gt;));</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">lockable_type</span><span class="special">&lt;</span><span class="identifier">Locker</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">lockable_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">syntactic_lock_traits</span><span class="special">&lt;</span><span class="identifier">lockable_type</span><span class="special">&gt;::</span><span class="identifier">lock_error</span> <span class="identifier">lock_error</span><span class="special">;</span>
+
+ <span class="identifier">nested_strict_locker</span><span class="special">(</span><span class="identifier">Locker</span><span class="special">&amp;</span> <span class="identifier">locker</span><span class="special">);</span>
+ <span class="special">~</span><span class="identifier">nested_strict_locker</span><span class="special">();</span>
+ <span class="keyword">typedef</span> <span class="keyword">bool</span> <span class="special">(</span><span class="identifier">nested_strict_locker</span><span class="special">::*</span><span class="identifier">bool_type</span><span class="special">)()</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="keyword">operator</span> <span class="identifier">bool_type</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">!()</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="keyword">bool</span> <span class="identifier">owns_lock</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="keyword">const</span> <span class="identifier">lockable_type</span><span class="special">*</span> <span class="identifier">mutex</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="keyword">bool</span> <span class="identifier">is_locking</span><span class="special">(</span><span class="identifier">lockable_type</span><span class="special">*</span> <span class="identifier">l</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="identifier">BOOST_ADRESS_OF_DELETE</span><span class="special">(</span><span class="identifier">nested_strict_locker</span><span class="special">)</span>
+ <span class="identifier">BOOST_HEAP_ALLOCATEION_DELETE</span><span class="special">(</span><span class="identifier">nested_strict_locker</span><span class="special">)</span>
+ <span class="identifier">BOOST_DEFAULT_CONSTRUCTOR_DELETE</span><span class="special">(</span><span class="identifier">strict_locker</span><span class="special">)</span> <span class="comment">/*&lt; disable default construction &gt;*/</span>
+ <span class="identifier">BOOST_COPY_CONSTRUCTOR_DELETE</span><span class="special">(</span><span class="identifier">strict_locker</span><span class="special">)</span> <span class="comment">/*&lt; disable copy construction &gt;*/</span>
+ <span class="identifier">BOOST_COPY_ASSIGNEMENT_DELETE</span><span class="special">(</span><span class="identifier">strict_locker</span><span class="special">)</span> <span class="comment">/*&lt; disable copy asignement &gt;*/</span>
+<span class="special">};</span>
+
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Locker</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">is_strict_locker</span><span class="special">&lt;</span><span class="identifier">nested_strict_locker</span><span class="special">&lt;</span><span class="identifier">Locker</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">:</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span> <span class="special">{}</span> <span class="special">;</span>
+</pre>
+<p>
+ }}
+ </p>
+<p>
+ <span class="bold"><strong>Description</strong></span>
+ </p>
+<p>
+ [Note strict_locker is not a model of Lockable concept.]
+ </p>
+<p>
+ <span class="bold"><strong><code class="computeroutput"><span class="identifier">strict_locker</span></code>
+ template parameters</strong></span>
+ </p>
+<div class="itemizedlist"><ul type="disc"><li>
+<code class="computeroutput"><span class="identifier">Lockable</span></code> : The exclusive
+ lockable type used to synchronize exclusive access
+ </li></ul></div>
+<p>
+ <span class="bold"><strong><code class="computeroutput"><span class="identifier">strict_locker</span></code>
+ public types</strong></span>
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<code class="computeroutput"><span class="identifier">lockable_type</span></code> : The
+ exclusive lockable type used to synchronize exclusive access
+ </li>
+<li>
+<code class="computeroutput"><span class="identifier">lock_error</span></code> : The exception
+ type throw incase of errors
+ </li>
+<li>
+<code class="computeroutput"><span class="identifier">bool_type</span></code> : The bool_type
+ of the safe_bool idiom
+ </li>
+</ul></div>
+<p>
+ <span class="bold"><strong><code class="computeroutput"><span class="identifier">nested_strict_locker</span></code>
+ public member functions</strong></span>
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li><code class="computeroutput"><span class="keyword">explicit</span> <span class="identifier">strict_locker</span><span class="special">(</span><span class="identifier">lockable_type</span><span class="special">&amp;</span> <span class="identifier">obj</span><span class="special">);</span></code></li>
+<li><code class="computeroutput"><span class="special">~</span><span class="identifier">strict_locker</span><span class="special">();</span></code></li>
+<li><code class="computeroutput"><span class="keyword">operator</span> <span class="identifier">bool_type</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code></li>
+<li><code class="computeroutput"><span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">!()</span> <span class="keyword">const</span><span class="special">;</span></code></li>
+<li><code class="computeroutput"><span class="keyword">operator</span> <span class="identifier">bool_type</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span></code></li>
+<li><code class="computeroutput"><span class="identifier">lockable_type</span><span class="special">*</span>
+ <span class="identifier">mutex</span><span class="special">()</span>
+ <span class="keyword">const</span><span class="special">;</span></code></li>
+<li><code class="computeroutput"><span class="identifier">lockable_type</span><span class="special">*</span>
+ <span class="identifier">get_lockable</span><span class="special">()</span>
+ <span class="keyword">const</span><span class="special">;</span></code></li>
+</ul></div>
+<p>
+ <span class="bold"><strong><code class="computeroutput"><span class="identifier">nested_strict_locker</span></code>
+ private and not defined member functions</strong></span>
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li><code class="computeroutput"><span class="identifier">strict_locker</span><span class="special">()</span></code></li>
+<li><code class="computeroutput"><span class="identifier">strict_locker</span><span class="special">(</span><span class="identifier">strict_locker</span><span class="special">&amp;);</span></code></li>
+<li><code class="computeroutput"><span class="keyword">operator</span><span class="special">=(</span><span class="identifier">strict_locker</span><span class="special">&amp;);</span></code></li>
+<li><code class="computeroutput"><span class="keyword">operator</span><span class="special">&amp;();</span></code></li>
+<li><code class="computeroutput"><span class="keyword">void</span><span class="special">*</span>
+ <span class="keyword">operator</span> <span class="keyword">new</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span><span class="special">)</span></code></li>
+<li><code class="computeroutput"><span class="keyword">void</span><span class="special">*</span>
+ <span class="keyword">operator</span> <span class="keyword">new</span><span class="special">[](</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span><span class="special">)</span></code></li>
+<li><code class="computeroutput"><span class="keyword">void</span> <span class="keyword">operator</span>
+ <span class="keyword">delete</span><span class="special">(</span><span class="keyword">void</span><span class="special">*)</span></code></li>
+<li><code class="computeroutput"><span class="keyword">void</span> <span class="keyword">operator</span>
+ <span class="keyword">delete</span><span class="special">[](</span><span class="keyword">void</span><span class="special">*)</span></code></li>
+</ul></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.lockers.strict_locker_hpp.class__nested_strict_locker_"></a><a href="lockers.html#boost_synchro.reference.lockers.strict_locker_hpp.class__nested_strict_locker_" title="Class
+ nested_strict_locker">Class
+ <code class="computeroutput"><span class="identifier">nested_strict_locker</span></code></a>
+</h5></div></div></div>
+<p>
+ <span class="bold"><strong>Synopsis</strong></span>
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Locker</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">nested_strict_locker</span> <span class="special">:</span> <span class="keyword">private</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">noncopyable</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">locker_traits</span><span class="special">&lt;</span><span class="identifier">Locker</span><span class="special">&gt;::</span><span class="identifier">bad_lock</span> <span class="identifier">bad_lock</span><span class="special">;</span>
+
+ <span class="identifier">nested_strict_locker</span><span class="special">(</span><span class="identifier">Locker</span><span class="special">&amp;</span> <span class="identifier">lock</span><span class="special">);</span>
+ <span class="special">~</span><span class="identifier">nested_strict_locker</span><span class="special">();</span>
+
+ <span class="keyword">typedef</span> <span class="identifier">unspecified</span> <span class="identifier">bool_type</span><span class="special">;</span>
+ <span class="keyword">operator</span> <span class="identifier">bool_type</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">!()</span> <span class="keyword">const</span>
+ <span class="keyword">bool</span> <span class="identifier">owns_lock</span><span class="special">()</span> <span class="keyword">const</span>
+ <span class="identifier">Mutex</span><span class="special">*</span> <span class="identifier">mutex</span><span class="special">()</span> <span class="keyword">const</span>
+<span class="keyword">private</span><span class="special">:</span>
+ <span class="identifier">strict_locker</span><span class="special">();</span>
+ <span class="identifier">BOOST_NON_ALIAS</span><span class="special">(</span><span class="identifier">strict_locker</span><span class="special">);</span>
+ <span class="identifier">BOOST_NON_HEAP_ALLOCATED</span><span class="special">();</span>
+<span class="special">};</span>
+</pre>
+<p>
+ <span class="bold"><strong>Description</strong></span>
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.lockers.strict_locker_hpp.template_class__nested_strict_locker_"></a><a href="lockers.html#boost_synchro.reference.lockers.strict_locker_hpp.template_class__nested_strict_locker_" title="Template
+ Class nested_strict_locker">Template
+ Class <code class="computeroutput"><span class="identifier">nested_strict_locker</span></code></a>
+</h5></div></div></div>
+<p>
+ A reverse (or anti) locker.
+ </p>
+<p>
+ <span class="bold"><strong>Synopsis</strong></span>
+ </p>
+<p>
+ <span class="bold"><strong>Description</strong></span>
+ </p>
+</div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.lockers.reverse_locker_hpp"></a><a href="lockers.html#boost_synchro.reference.lockers.reverse_locker_hpp" title="
+ Header &lt;boost/synchro/locker/reverse_locker.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">locker</span><span class="special">/</span><span class="identifier">reverse_locker</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl><dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.reverse_locker_hpp.class__reverse_lock_">Class
+ <code class="computeroutput"><span class="identifier">reverse_lock</span></code></a></span></dt></dl></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">reverse_locker</span><span class="special">;</span>
+</pre>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.lockers.reverse_locker_hpp.class__reverse_lock_"></a><a href="lockers.html#boost_synchro.reference.lockers.reverse_locker_hpp.class__reverse_lock_" title="Class
+ reverse_lock">Class
+ <code class="computeroutput"><span class="identifier">reverse_lock</span></code></a>
+</h5></div></div></div>
+<p>
+ This is an interesting adapter class that changes a Lockable into a reverse
+ lockable, i.e.,<code class="computeroutput"><span class="identifier">lock</span></code> on
+ this class calls <code class="computeroutput"><span class="identifier">unlock</span></code>
+ on the lockable, and <code class="computeroutput"><span class="identifier">unlock</span></code>
+ on this class calls <code class="computeroutput"><span class="identifier">lock</span></code>
+ on the lock. One motivation for this class is when we temporarily want
+ to unlock a lock (which we have already locked) but then re-lock it soon
+ after.
+ </p>
+<p>
+ <span class="bold"><strong>Synopsis</strong></span>
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">reverse_locker</span>
+<span class="special">{</span>
+ <span class="identifier">reverse_locker</span><span class="special">(</span><span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">mtx</span><span class="special">);</span>
+ <span class="special">~</span><span class="identifier">reverse_locker</span><span class="special">();</span>
+
+<span class="keyword">protected</span><span class="special">:</span>
+ <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">mtx_</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+</div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.lockers.nested_reverse_locker_hpp"></a><a href="lockers.html#boost_synchro.reference.lockers.nested_reverse_locker_hpp" title="
+ Header &lt;boost/synchro/locker/nested_reverse_locker.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">locker</span><span class="special">/</span><span class="identifier">nested_reverse_locker</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl><dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.nested_reverse_locker_hpp.class__nested_reverse_locker_">Class
+ <code class="computeroutput"><span class="identifier">nested_reverse_locker</span></code></a></span></dt></dl></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Locker</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">nested_reverse_locker</span><span class="special">;</span>
+</pre>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.lockers.nested_reverse_locker_hpp.class__nested_reverse_locker_"></a><a href="lockers.html#boost_synchro.reference.lockers.nested_reverse_locker_hpp.class__nested_reverse_locker_" title="Class
+ nested_reverse_locker">Class
+ <code class="computeroutput"><span class="identifier">nested_reverse_locker</span></code></a>
+</h5></div></div></div>
+<p>
+ This is an interesting adapter class that changes a locker into a reverse
+ locker, i.e., <code class="computeroutput"><span class="identifier">unlock</span></code>
+ on construction and <code class="computeroutput"><span class="identifier">lock</span></code>
+ on destruction. One motivation for this class is when we temporarily
+ want to unlock a lock (locked by another locker) but then re-lock it
+ soon after.
+ </p>
+<p>
+ <span class="bold"><strong>Synopsis</strong></span>
+ </p>
+<p>
+ template &lt;typename Locker&gt; class nested_reverse_locker : boost::noncopyable
+ { BOOST_CONCEPT_ASSERT((MovableLockerConcept&lt;Locker&gt;)); public:
+ explicit nested_reverse_locker(Locker&amp; locker); ~nested_reverse_locker();
+ };
+ </p>
+</div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.lockers.condition_locker_hpp"></a><a href="lockers.html#boost_synchro.reference.lockers.condition_locker_hpp" title="
+ Header &lt;boost/synchro/locker/condition_locker.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">locker</span><span class="special">/</span><span class="identifier">condition_locker</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.condition_locker_hpp.template_class__condition_backdoor_">Template
+ Class <code class="computeroutput"><span class="identifier">condition_backdoor</span></code></a></span></dt>
+<dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.condition_locker_hpp.template_class__condition_safe_">Template
+ Class <code class="computeroutput"><span class="identifier">condition_safe</span></code></a></span></dt>
+<dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.condition_locker_hpp.template_class__condition_unique_locker_">Template
+ Class <code class="computeroutput"><span class="identifier">condition_unique_locker</span></code></a></span></dt>
+</dl></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Condition</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">condition_backdoor</span><span class="special">;</span>
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Condition</span><span class="special">&gt;</span> <span class="keyword">class</span> <span class="identifier">condition_safe</span><span class="special">;</span>
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Condition</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">condition_unique_locker</span>
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Condition</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">condition_shared_locker</span>
+
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Condition</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">condition_unique_lockable</span>
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Condition</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">condition_shared_lockable</span>
+</pre>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.lockers.condition_locker_hpp.template_class__condition_backdoor_"></a><a href="lockers.html#boost_synchro.reference.lockers.condition_locker_hpp.template_class__condition_backdoor_" title="Template
+ Class condition_backdoor">Template
+ Class <code class="computeroutput"><span class="identifier">condition_backdoor</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Condition</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">condition_backdoor</span> <span class="special">{</span>
+ <span class="identifier">condition_backdoor</span><span class="special">(</span><span class="identifier">condition_safe</span><span class="special">&lt;</span><span class="identifier">Condition</span><span class="special">&gt;&amp;</span><span class="identifier">cnd</span><span class="special">);</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Locker</span><span class="special">&gt;</span>
+ <span class="keyword">void</span> <span class="identifier">wait</span><span class="special">(</span><span class="identifier">Locker</span><span class="special">&amp;</span> <span class="identifier">lock</span><span class="special">);</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Locker</span><span class="special">&gt;</span>
+ <span class="keyword">bool</span> <span class="identifier">wait_until</span><span class="special">(</span><span class="identifier">Locker</span><span class="special">&amp;</span> <span class="identifier">lock</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">system_time</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">abs_time</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Locker</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">duration_type</span><span class="special">&gt;</span>
+ <span class="keyword">bool</span> <span class="identifier">wait_for</span><span class="special">(</span><span class="identifier">Locker</span><span class="special">&amp;</span> <span class="identifier">lock</span><span class="special">,</span> <span class="identifier">duration_type</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">rel_time</span><span class="special">);</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Locker</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Predicate</span><span class="special">&gt;</span>
+ <span class="keyword">void</span> <span class="identifier">wait_when</span><span class="special">(</span><span class="identifier">Locker</span><span class="special">&amp;</span> <span class="identifier">lock</span><span class="special">,</span> <span class="identifier">Predicate</span> <span class="identifier">pred</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Locker</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">predicate_type</span><span class="special">&gt;</span>
+ <span class="keyword">bool</span> <span class="identifier">wait_when_until</span><span class="special">(</span><span class="identifier">Locker</span><span class="special">&amp;</span> <span class="identifier">lock</span><span class="special">,</span> <span class="identifier">predicate_type</span> <span class="identifier">pred</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">system_time</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">abs_time</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Locker</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">predicate_type</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">duration_type</span><span class="special">&gt;</span>
+ <span class="keyword">bool</span> <span class="identifier">wait_when_for</span><span class="special">(</span><span class="identifier">Locker</span><span class="special">&amp;</span> <span class="identifier">lock</span><span class="special">,</span> <span class="identifier">predicate_type</span> <span class="identifier">pred</span><span class="special">,</span> <span class="identifier">duration_type</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">rel_time</span><span class="special">);</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Locker</span><span class="special">&gt;</span>
+ <span class="keyword">void</span> <span class="identifier">notify_one</span><span class="special">(</span><span class="identifier">Locker</span><span class="special">&amp;</span> <span class="identifier">lock</span><span class="special">);</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Locker</span><span class="special">&gt;</span>
+ <span class="keyword">void</span> <span class="identifier">notify_all</span><span class="special">(</span><span class="identifier">Locker</span><span class="special">&amp;</span> <span class="identifier">lock</span><span class="special">);</span>
+<span class="special">};</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.lockers.condition_locker_hpp.template_class__condition_safe_"></a><a href="lockers.html#boost_synchro.reference.lockers.condition_locker_hpp.template_class__condition_safe_" title="Template
+ Class condition_safe">Template
+ Class <code class="computeroutput"><span class="identifier">condition_safe</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Condition</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">condition_safe</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">Condition</span> <span class="identifier">condition</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">condition_backdoor</span><span class="special">&lt;</span><span class="identifier">Condition</span><span class="special">&gt;</span> <span class="identifier">backdoor</span><span class="special">;</span>
+ <span class="keyword">void</span> <span class="identifier">notify_one</span><span class="special">();</span>
+ <span class="keyword">void</span> <span class="identifier">notify_all</span><span class="special">();</span>
+<span class="special">};</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.lockers.condition_locker_hpp.template_class__condition_unique_locker_"></a><a href="lockers.html#boost_synchro.reference.lockers.condition_locker_hpp.template_class__condition_unique_locker_" title="Template
+ Class condition_unique_locker">Template
+ Class <code class="computeroutput"><span class="identifier">condition_unique_locker</span></code></a>
+</h5></div></div></div>
+<p>
+ template &lt; typename Lockable, class Condition=condition_safe&lt;typename
+ best_condition&lt;Lockable&gt;::type &gt; &gt; class condition_unique_locker
+ : protected unique_lock&lt;Lockable&gt; { BOOST_CONCEPT_ASSERT((LockableConcept&lt;Lockable&gt;));
+ public: typedef Lockable lockable_type; typedef Condition condition;
+ </p>
+<pre class="programlisting"><span class="keyword">explicit</span> <span class="identifier">condition_unique_locker</span><span class="special">(</span><span class="identifier">lockable_type</span><span class="special">&amp;</span> <span class="identifier">obj</span><span class="special">);</span>
+<span class="identifier">condition_unique_locker</span><span class="special">(</span><span class="identifier">lockable_type</span><span class="special">&amp;</span> <span class="identifier">obj</span><span class="special">,</span> <span class="identifier">condition</span> <span class="special">&amp;</span><span class="identifier">cond</span><span class="special">);</span>
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Predicate</span><span class="special">&gt;</span>
+<span class="identifier">condition_unique_locker</span><span class="special">(</span><span class="identifier">lockable_type</span><span class="special">&amp;</span> <span class="identifier">obj</span><span class="special">,</span> <span class="identifier">condition</span> <span class="special">&amp;</span><span class="identifier">cond</span><span class="special">,</span> <span class="identifier">Predicate</span> <span class="identifier">pred</span><span class="special">);</span>
+<span class="special">~</span><span class="identifier">condition_unique_locker</span><span class="special">();</span>
+
+<span class="keyword">typedef</span> <span class="keyword">bool</span> <span class="special">(</span><span class="identifier">condition_unique_locker</span><span class="special">::*</span><span class="identifier">bool_type</span><span class="special">)()</span> <span class="keyword">const</span><span class="special">;</span>
+<span class="keyword">operator</span> <span class="identifier">bool_type</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">!()</span> <span class="keyword">const</span><span class="special">;</span>
+<span class="keyword">bool</span> <span class="identifier">owns_lock</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+<span class="keyword">bool</span> <span class="identifier">is_locking</span><span class="special">(</span><span class="identifier">lockable_type</span><span class="special">*</span> <span class="identifier">l</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+
+<span class="keyword">void</span> <span class="identifier">relock_on</span><span class="special">(</span><span class="identifier">condition</span> <span class="special">&amp;</span> <span class="identifier">cond</span><span class="special">);</span>
+<span class="keyword">void</span> <span class="identifier">relock_until</span><span class="special">(</span><span class="identifier">condition</span> <span class="special">&amp;</span> <span class="identifier">cond</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">system_time</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">abs_time</span><span class="special">);</span>
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">duration_type</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">relock_on_for</span><span class="special">(</span><span class="identifier">condition</span> <span class="special">&amp;</span> <span class="identifier">cond</span><span class="special">,</span> <span class="identifier">duration_type</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">rel_time</span><span class="special">);</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Predicate</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">relock_when</span><span class="special">(</span><span class="identifier">condition</span> <span class="special">&amp;</span><span class="identifier">cond</span><span class="special">,</span> <span class="identifier">Predicate</span> <span class="identifier">pred</span><span class="special">);</span>
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Predicate</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">relock_when_until</span><span class="special">(</span><span class="identifier">condition</span> <span class="special">&amp;</span><span class="identifier">cond</span><span class="special">,</span> <span class="identifier">Predicate</span> <span class="identifier">pred</span><span class="special">,</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">system_time</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">abs_time</span><span class="special">);</span>
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Predicate</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">duration_type</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">relock_when_for</span><span class="special">(</span><span class="identifier">condition</span> <span class="special">&amp;</span><span class="identifier">cond</span><span class="special">,</span> <span class="identifier">Predicate</span> <span class="identifier">pred</span><span class="special">,</span>
+ <span class="identifier">duration_type</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">rel_time</span><span class="special">);</span>
+
+<span class="comment">/*&lt; no possibility to unlock without blocking on wait... &gt;*/</span>
+</pre>
+<p>
+ };
+ </p>
+</div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.lockers.externally_locked_hpp"></a><a href="lockers.html#boost_synchro.reference.lockers.externally_locked_hpp" title="
+ Header &lt;boost/synchro/locker/externally_locked.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">locker</span><span class="special">/</span><span class="identifier">externally_locked</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl><dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.externally_locked_hpp.template_class__externally_locked_">Template
+ Class <code class="computeroutput"><span class="identifier">externally_locked</span></code></a></span></dt></dl></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.lockers.externally_locked_hpp.template_class__externally_locked_"></a><a href="lockers.html#boost_synchro.reference.lockers.externally_locked_hpp.template_class__externally_locked_" title="Template
+ Class externally_locked">Template
+ Class <code class="computeroutput"><span class="identifier">externally_locked</span></code></a>
+</h5></div></div></div>
+<p>
+ <span class="bold"><strong>Synopsis</strong></span>
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">externally_locked</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="identifier">externally_locked</span><span class="special">(</span><span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">owner</span><span class="special">);</span>
+ <span class="identifier">externally_locked</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">obj</span><span class="special">,</span> <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">own</span><span class="special">);</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Locker</span><span class="special">&gt;</span>
+ <span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">get</span><span class="special">(</span><span class="identifier">Locker</span><span class="special">&amp;</span> <span class="identifier">locker</span><span class="special">);</span>
+ <span class="keyword">void</span> <span class="identifier">set</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">obj</span><span class="special">,</span> <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">owner</span><span class="special">);</span>
+<span class="special">};</span>
+</pre>
+<p>
+ <span class="bold"><strong>Description</strong></span> <code class="computeroutput"><span class="identifier">externally_locked</span></code>
+ cloaks an object of type T, and actually provides full access to that
+ object through the get and set member functions, provided you pass a
+ reference to a strict_locker&lt;Lockable&gt; object.
+ </p>
+<p>
+ <span class="bold"><strong><code class="computeroutput"><span class="identifier">externally_locked</span></code>
+ template parameters</strong></span>
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<code class="computeroutput"><span class="identifier">T</span></code> : the type locked
+ externally
+ </li>
+<li>
+<code class="computeroutput"><span class="identifier">Lockable</span></code> : The lockable
+ type used to synchronize the access to a T instance
+ </li>
+</ul></div>
+<p>
+ <span class="bold"><strong><code class="computeroutput"><span class="identifier">externally_locked</span></code>
+ public member functions</strong></span>
+ </p>
+<div class="itemizedlist"><ul type="disc"><li><code class="computeroutput"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Locker</span><span class="special">&gt;</span> <span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">get</span><span class="special">(</span><span class="identifier">Locker</span><span class="special">&amp;</span> <span class="identifier">locker</span><span class="special">);</span></code></li></ul></div>
+<p>
+ <span class="bold"><strong>Requires:</strong></span> mpl:and_&lt;is_strict_locker&lt;Locker&gt;,
+ is_same&lt;lockable_type_trait&lt;Locker&gt;, Lockable&gt;.
+ </p>
+<p>
+ <span class="bold"><strong>Returns:</strong></span> a reference to the type locked
+ externally.
+ </p>
+<p>
+ <span class="bold"><strong>Throws:</strong></span> lock_error when the locker do
+ not owns the lockable instance
+ </p>
+<div class="itemizedlist"><ul type="disc"><li><code class="computeroutput"><span class="keyword">void</span> <span class="identifier">set</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;</span>
+ <span class="identifier">obj</span><span class="special">,</span>
+ <span class="identifier">Lockable</span><span class="special">&amp;</span>
+ <span class="identifier">owner</span><span class="special">);</span></code></li></ul></div>
+<p>
+ <span class="bold"><strong>Effect:</strong></span> reinit the type and lockable
+ references with the given values.
+ </p>
+<p>
+ <span class="bold"><strong>Example:</strong></span> See
+ </p>
+</div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.lockers.locking_ptr_hpp"></a><a href="lockers.html#boost_synchro.reference.lockers.locking_ptr_hpp" title=" Header
+ &lt;boost/synchro/locker/locking_ptr.hpp&gt;"> Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">locker</span><span class="special">/</span><span class="identifier">locking_ptr</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.locking_ptr_hpp.class__locking_ptr_">Class
+ <code class="computeroutput"><span class="identifier">locking_ptr</span></code></a></span></dt>
+<dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.locking_ptr_hpp.class__sharable_locking_ptr_">Class
+ <code class="computeroutput"><span class="identifier">sharable_locking_ptr</span></code></a></span></dt>
+</dl></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.lockers.locking_ptr_hpp.class__locking_ptr_"></a><a href="lockers.html#boost_synchro.reference.lockers.locking_ptr_hpp.class__locking_ptr_" title="Class
+ locking_ptr">Class
+ <code class="computeroutput"><span class="identifier">locking_ptr</span></code></a>
+</h5></div></div></div>
+<p>
+ <span class="bold"><strong>Synopsis</strong></span>
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">locking_ptr</span> <span class="special">:</span> <span class="keyword">private</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">noncopyable</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">T</span> <span class="identifier">value_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">Lockable</span> <span class="identifier">mutex_type</span><span class="special">;</span>
+
+ <span class="identifier">locking_ptr</span><span class="special">(</span><span class="keyword">volatile</span> <span class="identifier">value_type</span><span class="special">&amp;</span> <span class="identifier">obj</span><span class="special">,</span> <span class="identifier">mutex_type</span><span class="special">&amp;</span> <span class="identifier">mtx</span><span class="special">);</span>
+ <span class="special">~</span><span class="identifier">locking_ptr</span><span class="special">();</span>
+
+ <span class="identifier">value_type</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">*();</span>
+ <span class="keyword">const</span> <span class="identifier">value_type</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">*()</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="identifier">value_type</span><span class="special">*</span> <span class="keyword">operator</span><span class="special">-&gt;();</span>
+ <span class="keyword">const</span> <span class="identifier">value_type</span><span class="special">*</span> <span class="keyword">operator</span><span class="special">-&gt;()</span> <span class="keyword">const</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+<p>
+ <span class="bold"><strong>Description</strong></span>
+ </p>
+<p>
+ The <code class="computeroutput"><span class="identifier">locking_ptr</span></code> overloads
+ <code class="computeroutput"><span class="keyword">operator</span><span class="special">-&gt;</span></code>
+ to return a temporary object that will perform the locking. This too
+ provides an <code class="computeroutput"><span class="keyword">operator</span><span class="special">-&gt;</span></code>.
+ Calls to <code class="computeroutput"><span class="keyword">operator</span><span class="special">-&gt;</span></code>
+ are automatically chained by the compiler until a raw pointer type is
+ returned. In pointer's <code class="computeroutput"><span class="keyword">operator</span><span class="special">-&gt;</span></code> the lock is applied and in its destructor,
+ called at the end of a full expression, it is released.
+ </p>
+<div class="warning"><table border="0" summary="Warning">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="../../../../../../doc/html/images/warning.png"></td>
+<th align="left">Warning</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ Programmers should be careful about attempting to access the same object
+ twice in a statement using <code class="computeroutput"><span class="identifier">locking_ptr</span></code>:
+ this will cause deadlock if the synchronisation strategy is not re-entrant.
+ </p></td></tr>
+</table></div>
+<p>
+ <span class="bold"><strong>Example Code</strong></span>
+ </p>
+<p>
+ <span class="bold"><strong><code class="computeroutput"><span class="identifier">locking_ptr</span></code>
+ constructors:destructors</strong></span> # <code class="computeroutput"><span class="identifier">locking_ptr</span><span class="special">(</span><span class="keyword">volatile</span> <span class="identifier">value_type</span><span class="special">&amp;</span>
+ <span class="identifier">obj</span><span class="special">,</span>
+ <span class="identifier">mutex_type</span><span class="special">&amp;</span>
+ <span class="identifier">mtx</span><span class="special">);</span></code>
+ # <code class="computeroutput"><span class="special">~</span><span class="identifier">locking_ptr</span><span class="special">();</span></code>
+ </p>
+<p>
+ <span class="bold"><strong><code class="computeroutput"><span class="identifier">locking_ptr</span></code>
+ public member functions</strong></span>
+ </p>
+<div class="orderedlist"><ol type="1">
+<li><code class="computeroutput"><span class="identifier">value_type</span><span class="special">&amp;</span>
+ <span class="keyword">operator</span><span class="special">*();</span></code></li>
+<li><code class="computeroutput"><span class="keyword">const</span> <span class="identifier">value_type</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">*()</span> <span class="keyword">const</span><span class="special">;</span></code></li>
+<li><code class="computeroutput"><span class="identifier">value_type</span><span class="special">*</span>
+ <span class="keyword">operator</span><span class="special">-&gt;();</span></code></li>
+<li><code class="computeroutput"><span class="keyword">const</span> <span class="identifier">value_type</span><span class="special">*</span> <span class="keyword">operator</span><span class="special">-&gt;()</span> <span class="keyword">const</span><span class="special">;</span></code></li>
+</ol></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.lockers.locking_ptr_hpp.class__sharable_locking_ptr_"></a><a href="lockers.html#boost_synchro.reference.lockers.locking_ptr_hpp.class__sharable_locking_ptr_" title="Class
+ sharable_locking_ptr">Class
+ <code class="computeroutput"><span class="identifier">sharable_locking_ptr</span></code></a>
+</h5></div></div></div>
+<p>
+ <span class="bold"><strong>Synopsis</strong></span>
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">SharableLockable</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">sharable_locking_ptr</span>
+ <span class="special">:</span> <span class="keyword">private</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">noncopyable</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">T</span> <span class="identifier">value_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">SharableLockable</span> <span class="identifier">mutex_type</span><span class="special">;</span>
+
+ <span class="identifier">sharable_locking_ptr</span><span class="special">(</span><span class="keyword">volatile</span> <span class="identifier">value_type</span><span class="special">&amp;</span> <span class="identifier">obj</span><span class="special">,</span> <span class="identifier">mutex_type</span><span class="special">&amp;</span> <span class="identifier">mtx</span><span class="special">);</span>
+ <span class="special">~</span><span class="identifier">sharable_locking_ptr</span><span class="special">();</span>
+
+ <span class="identifier">value_type</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">*();</span>
+ <span class="keyword">const</span> <span class="identifier">value_type</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">*()</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="identifier">value_type</span><span class="special">*</span> <span class="keyword">operator</span><span class="special">-&gt;();</span>
+ <span class="keyword">const</span> <span class="identifier">value_type</span><span class="special">*</span> <span class="keyword">operator</span><span class="special">-&gt;()</span> <span class="keyword">const</span><span class="special">;</span>
+<span class="special">};</span>
+
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">SharableLockable</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">sharable_locking_ptr</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">SharableLockable</span><span class="special">&gt;</span>
+ <span class="special">:</span> <span class="keyword">private</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">noncopyable</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">T</span> <span class="identifier">value_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">SharableLockable</span> <span class="identifier">mutex_type</span><span class="special">;</span>
+
+ <span class="identifier">sharable_locking_ptr</span><span class="special">(</span>
+ <span class="keyword">volatile</span> <span class="keyword">const</span> <span class="identifier">value_type</span><span class="special">&amp;</span> <span class="identifier">obj</span><span class="special">,</span>
+ <span class="identifier">mutex_type</span><span class="special">&amp;</span> <span class="identifier">mtx</span><span class="special">);</span>
+ <span class="special">~</span><span class="identifier">sharable_locking_ptr</span><span class="special">();</span>
+
+ <span class="identifier">value_type</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">*();</span>
+ <span class="keyword">const</span> <span class="identifier">value_type</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">*()</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="identifier">value_type</span><span class="special">*</span> <span class="keyword">operator</span><span class="special">-&gt;();</span>
+ <span class="keyword">const</span> <span class="identifier">value_type</span><span class="special">*</span> <span class="keyword">operator</span><span class="special">-&gt;()</span> <span class="keyword">const</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+<p>
+ <span class="bold"><strong>Description</strong></span>
+ </p>
+<p>
+ <span class="bold"><strong><code class="computeroutput"><span class="identifier">nested_strict_locker</span></code>
+ public member functions</strong></span>
+ </p>
+<div class="orderedlist"><ol type="1"><li><code class="computeroutput"><span class="special">;</span></code></li></ol></div>
+</div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.lockers.on_derreference_locking_ptr_hpp"></a><a href="lockers.html#boost_synchro.reference.lockers.on_derreference_locking_ptr_hpp" title="
+ Header &lt;boost/synchro/locker/on_derreference_locking_ptr.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">locker</span><span class="special">/</span><span class="identifier">on_derreference_locking_ptr</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl><dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.on_derreference_locking_ptr_hpp.class__on_derreference_locking_ptr_">Class
+ <code class="computeroutput"><span class="identifier">on_derreference_locking_ptr</span></code></a></span></dt></dl></div>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">synchro</span> <span class="special">{</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+ <span class="keyword">class</span> <span class="identifier">on_derreference_locking_ptr</span><span class="special">;</span>
+<span class="special">}}</span>
+</pre>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.lockers.on_derreference_locking_ptr_hpp.class__on_derreference_locking_ptr_"></a><a href="lockers.html#boost_synchro.reference.lockers.on_derreference_locking_ptr_hpp.class__on_derreference_locking_ptr_" title="Class
+ on_derreference_locking_ptr">Class
+ <code class="computeroutput"><span class="identifier">on_derreference_locking_ptr</span></code></a>
+</h5></div></div></div>
+<p>
+ <span class="bold"><strong>Synopsis</strong></span>
+ </p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">on_derreference_locking_ptr</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">class</span> <span class="identifier">pointer</span> <span class="special">{</span>
+ <span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">explicit</span> <span class="identifier">pointer</span><span class="special">(</span><span class="identifier">T</span><span class="special">*</span> <span class="identifier">target</span><span class="special">,</span> <span class="identifier">Lockable</span><span class="special">*</span> <span class="identifier">mutex</span><span class="special">);</span>
+ <span class="special">~</span><span class="identifier">pointer</span><span class="special">();</span>
+ <span class="identifier">T</span> <span class="special">*</span><span class="keyword">operator</span><span class="special">-&gt;();</span>
+ <span class="special">};</span>
+
+ <span class="keyword">explicit</span> <span class="identifier">on_derreference_locking_ptr</span><span class="special">(</span><span class="identifier">T</span> <span class="special">&amp;</span><span class="identifier">target</span><span class="special">,</span> <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">mutex</span><span class="special">);</span>
+ <span class="identifier">pointer</span> <span class="keyword">operator</span><span class="special">-&gt;()</span> <span class="keyword">const</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+<p>
+ <span class="bold"><strong>Description</strong></span>
+ </p>
+</div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.lockers.array_unique_locker_hpp"></a><a href="lockers.html#boost_synchro.reference.lockers.array_unique_locker_hpp" title="
+ Header &lt;boost/synchro/locker/array_unique_locker.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">locker</span><span class="special">/</span><span class="identifier">array_unique_locker</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.array_unique_locker_hpp.template_class__unique_array_locker___">Template
+ Class <code class="computeroutput"><span class="identifier">unique_array_locker</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="lockers.html#boost_synchro.reference.lockers.array_unique_locker_hpp.template_class__try_unique_array_locker___">Template
+ Class <code class="computeroutput"><span class="identifier">try_unique_array_locker</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+</dl></div>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">synchro</span> <span class="special">{</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="identifier">N</span><span class="special">&gt;</span>
+ <span class="keyword">class</span> <span class="identifier">unique_array_locker</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="identifier">N</span><span class="special">&gt;</span>
+ <span class="keyword">class</span> <span class="identifier">try_unique_array_locker</span><span class="special">;</span>
+
+<span class="special">}}</span>
+</pre>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.lockers.array_unique_locker_hpp.template_class__unique_array_locker___"></a><a href="lockers.html#boost_synchro.reference.lockers.array_unique_locker_hpp.template_class__unique_array_locker___" title="Template
+ Class unique_array_locker&lt;&gt;">Template
+ Class <code class="computeroutput"><span class="identifier">unique_array_locker</span><span class="special">&lt;&gt;</span></code></a>
+</h5></div></div></div>
+<p>
+ <span class="bold"><strong>Synopsis</strong></span>
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="identifier">N</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">unique_array_locker</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">Lockable</span> <span class="identifier">lockable_type</span><span class="special">;</span>
+ <span class="identifier">BOOST_NON_CONST_COPY_CONSTRUCTOR_DELETE</span><span class="special">(</span><span class="identifier">unique_array_locker</span><span class="special">)</span> <span class="comment">/*&lt; disable copy construction &gt;*/</span>
+ <span class="identifier">BOOST_NON_CONST_COPY_ASSIGNEMENT_DELETE</span><span class="special">(</span><span class="identifier">unique_array_locker</span><span class="special">)</span> <span class="comment">/*&lt; disable copy asignement &gt;*/</span>
+
+ <span class="identifier">unique_array_locker</span><span class="special">(</span><span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">m0</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">m_n</span><span class="special">);</span>
+ <span class="identifier">unique_array_locker</span><span class="special">(</span><span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">m0</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">m_n</span><span class="special">,</span> <span class="identifier">adopt_lock_t</span><span class="special">);</span>
+ <span class="identifier">unique_array_locker</span><span class="special">(</span><span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">m0</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">m_n</span><span class="special">,</span> <span class="identifier">defer_lock</span><span class="special">);</span>
+ <span class="identifier">unique_array_locker</span><span class="special">(</span><span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">m0</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">m_n</span><span class="special">,</span> <span class="identifier">try_to_lock_t</span><span class="special">);</span>
+
+ <span class="comment">// try_lock_until constructor
+</span> <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span> <span class="special">&gt;</span>
+ <span class="identifier">unique_array_locker</span><span class="special">(</span><span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">m0</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">m_n</span><span class="special">,</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">target_time</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span> <span class="special">&gt;</span>
+ <span class="identifier">unique_array_locker</span><span class="special">(</span><span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">m0</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">m_n</span><span class="special">,</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special">&lt;</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">target_time</span><span class="special">)</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span> <span class="special">&gt;</span>
+ <span class="identifier">unique_array_locker</span><span class="special">(</span><span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">m0</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">m_n</span><span class="special">,</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">target_time</span><span class="special">,</span> <span class="identifier">throw_timeout_t</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span> <span class="special">&gt;</span>
+ <span class="identifier">unique_array_locker</span><span class="special">(</span><span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">m0</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">m_n</span><span class="special">,</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special">&lt;</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">target_time</span><span class="special">,</span> <span class="identifier">throw_timeout_t</span><span class="special">)</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span> <span class="special">&gt;</span>
+ <span class="identifier">unique_array_locker</span><span class="special">(</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">target_time</span><span class="special">,</span> <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">m0</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">m_n</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span> <span class="special">&gt;</span>
+ <span class="identifier">unique_array_locker</span><span class="special">(</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special">&lt;</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">target_time</span><span class="special">,</span> <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">m0</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">m_n</span><span class="special">,</span> <span class="special">)</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span> <span class="special">&gt;</span>
+ <span class="identifier">unique_array_locker</span><span class="special">(</span><span class="identifier">nothrow_timeout_t</span><span class="special">,</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">target_time</span><span class="special">,</span> <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">m0</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">m_n</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span> <span class="special">&gt;</span>
+ <span class="identifier">unique_array_locker</span><span class="special">(</span><span class="identifier">nothrow_timeout_t</span><span class="special">,</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special">&lt;</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">target_time</span><span class="special">,</span> <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">m0</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">m2</span><span class="special">)</span>
+
+ <span class="special">~</span><span class="identifier">unique_array_locker</span><span class="special">();</span>
+
+ <span class="keyword">bool</span> <span class="identifier">is_locking</span><span class="special">(</span><span class="identifier">lockable_type</span><span class="special">*</span> <span class="identifier">l</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="keyword">bool</span> <span class="identifier">owns_lock</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">unspecified</span><span class="special">-</span><span class="identifier">type</span> <span class="identifier">bool_type</span><span class="special">)()</span> <span class="keyword">const</span><span class="special">;</span> <span class="comment">/*&lt; safe bool idiom &gt;*/</span>
+ <span class="keyword">operator</span> <span class="identifier">bool_type</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">!()</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="keyword">void</span> <span class="identifier">lock</span><span class="special">();</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span> <span class="special">&gt;</span>
+ <span class="keyword">void</span> <span class="identifier">lock_until</span><span class="special">(</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">absolute_time</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span> <span class="special">&gt;</span>
+ <span class="keyword">void</span> <span class="identifier">lock_for</span><span class="special">(</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special">&lt;</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">relative_time</span><span class="special">);</span>
+
+ <span class="keyword">void</span> <span class="identifier">unlock</span><span class="special">();</span>
+
+ <span class="keyword">bool</span> <span class="identifier">try_lock</span><span class="special">();</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span> <span class="special">&gt;</span>
+ <span class="keyword">bool</span> <span class="identifier">try_lock_until</span><span class="special">(</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">absolute_time</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span> <span class="special">&gt;</span>
+ <span class="keyword">bool</span> <span class="identifier">try_lock_for</span><span class="special">(</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special">&lt;</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">relative_time</span><span class="special">);</span>
+
+<span class="special">};</span>
+</pre>
+<p>
+ <span class="bold"><strong>Description</strong></span>
+ </p>
+<p>
+ <span class="bold"><strong><code class="computeroutput"><span class="identifier">unique_array_locker</span></code>
+ template parameters</strong></span>
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<code class="computeroutput"><span class="identifier">Lockable</span></code> : The exclusive
+ lockable type used to synchronize exclusive access
+ </li>
+<li>
+<code class="computeroutput"><span class="identifier">N</span></code> : The number of lockables
+ in the array
+ </li>
+</ul></div>
+<p>
+ <span class="bold"><strong><code class="computeroutput"><span class="identifier">unique_array_locker</span></code>
+ public types</strong></span>
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<code class="computeroutput"><span class="identifier">lockable_type</span></code> : The
+ exclusive lockable type used to synchronize exclusive access
+ </li>
+<li>
+<code class="computeroutput"><span class="identifier">lock_error</span></code> : The exception
+ type throw in case of errors
+ </li>
+<li>
+<code class="computeroutput"><span class="identifier">bool_type</span></code> : The bool_type
+ of the safe_bool idiom
+ </li>
+</ul></div>
+<p>
+ <span class="bold"><strong><code class="computeroutput"><span class="identifier">unique_array_locker</span></code>
+ private and not defined member functions</strong></span>
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li><code class="computeroutput"><span class="identifier">unique_array_locker</span><span class="special">()</span></code></li>
+<li><code class="computeroutput"><span class="identifier">unique_array_locker</span><span class="special">(</span><span class="identifier">unique_array_locker</span><span class="special">&amp;);</span></code></li>
+<li><code class="computeroutput"><span class="keyword">operator</span><span class="special">=(</span><span class="identifier">unique_array_locker</span><span class="special">&amp;);</span></code></li>
+</ul></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.lockers.array_unique_locker_hpp.template_class__try_unique_array_locker___"></a><a href="lockers.html#boost_synchro.reference.lockers.array_unique_locker_hpp.template_class__try_unique_array_locker___" title="Template
+ Class try_unique_array_locker&lt;&gt;">Template
+ Class <code class="computeroutput"><span class="identifier">try_unique_array_locker</span><span class="special">&lt;&gt;</span></code></a>
+</h5></div></div></div>
+<p>
+ <span class="bold"><strong>Synopsis</strong></span>
+ </p>
+</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"><div class="copyright-footer">Copyright © 2008 Vicente J. Botet Escriba<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="condition_lockables.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="single_threaded.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/synchro/libs/synchro/doc/html/boost_synchro/reference/multi_process.html
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/html/boost_synchro/reference/multi_process.html 2009-10-12 17:49:35 EDT (Mon, 12 Oct 2009)
@@ -0,0 +1,152 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Multi-process</title>
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+<link rel="start" href="../../index.html" title="Chapter 1. Boost.Synchro">
+<link rel="up" href="../reference.html" title="Reference">
+<link rel="prev" href="multi_threaded.html" title="Multi-threaded">
+<link rel="next" href="polymorphic_locks.html" title="Polymorphic
+ Locks">
+</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">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="multi_threaded.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="polymorphic_locks.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_synchro.reference.multi_process"></a>Multi-process
+</h3></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="multi_process.html#boost_synchro.reference.multi_process.thread_lockable_scope_traits_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">thread</span><span class="special">/</span><span class="identifier">lockable_scope_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="multi_process.html#boost_synchro.reference.multi_process.thread_lockable_scope_traits_hpp.template_class_specialization__scope_traits_multi_process_tag__">Template
+ Class Specialization <code class="computeroutput"><span class="identifier">scope_traits</span><span class="special">&lt;</span><span class="identifier">multi_process_tag</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="multi_process.html#boost_synchro.reference.multi_process.thread_lockable_scope_traits_hpp.template_class_specialization__lockable_scope_traits_multi_process_tag__lockable__">Template
+ Class Specialization <code class="computeroutput"><span class="identifier">lockable_scope_traits</span><span class="special">&lt;</span><span class="identifier">multi_process_tag</span><span class="special">,</span> <span class="identifier">Lockable</span><span class="special">&gt;</span></code></a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="multi_process.html#boost_synchro.reference.multi_process.process_synchronization_family_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">process_synchronization_family</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dd><dl><dt><span class="section"><a href="multi_process.html#boost_synchro.reference.multi_process.process_synchronization_family_hpp.class__process_synchronization_family_">Class
+ <code class="computeroutput"><span class="identifier">process_synchronization_family</span></code></a></span></dt></dl></dd>
+</dl></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.multi_process.thread_lockable_scope_traits_hpp"></a><a href="multi_process.html#boost_synchro.reference.multi_process.thread_lockable_scope_traits_hpp" title="
+ Header &lt;boost/synchro/thread/lockable_scope_traits.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">thread</span><span class="special">/</span><span class="identifier">lockable_scope_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="multi_process.html#boost_synchro.reference.multi_process.thread_lockable_scope_traits_hpp.template_class_specialization__scope_traits_multi_process_tag__">Template
+ Class Specialization <code class="computeroutput"><span class="identifier">scope_traits</span><span class="special">&lt;</span><span class="identifier">multi_process_tag</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="multi_process.html#boost_synchro.reference.multi_process.thread_lockable_scope_traits_hpp.template_class_specialization__lockable_scope_traits_multi_process_tag__lockable__">Template
+ Class Specialization <code class="computeroutput"><span class="identifier">lockable_scope_traits</span><span class="special">&lt;</span><span class="identifier">multi_process_tag</span><span class="special">,</span> <span class="identifier">Lockable</span><span class="special">&gt;</span></code></a></span></dt>
+</dl></div>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">synchro</span> <span class="special">{</span>
+ <span class="keyword">template</span><span class="special">&lt;&gt;</span> <span class="keyword">struct</span> <span class="identifier">scope_traits</span><span class="special">&lt;</span><span class="identifier">multi_process_tag</span><span class="special">&gt;</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">lockable_scope_traits</span><span class="special">&lt;</span><span class="identifier">multi_process_tag</span><span class="special">,</span> <span class="identifier">Lockable</span><span class="special">&gt;;</span>
+<span class="special">}}</span>
+</pre>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.multi_process.thread_lockable_scope_traits_hpp.template_class_specialization__scope_traits_multi_process_tag__"></a><a href="multi_process.html#boost_synchro.reference.multi_process.thread_lockable_scope_traits_hpp.template_class_specialization__scope_traits_multi_process_tag__" title="Template
+ Class Specialization scope_traits&lt;multi_process_tag&gt;">Template
+ Class Specialization <code class="computeroutput"><span class="identifier">scope_traits</span><span class="special">&lt;</span><span class="identifier">multi_process_tag</span><span class="special">&gt;</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">scope_traits</span><span class="special">&lt;</span><span class="identifier">multi_process_tag</span><span class="special">&gt;</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">interprocess</span><span class="special">::</span><span class="identifier">lock_exception</span> <span class="identifier">lock_error</span><span class="special">;</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">moved_object</span> <span class="special">:</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">interprocess</span><span class="special">::</span><span class="identifier">detail</span><span class="special">::</span><span class="identifier">moved_object</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="special">{</span>
+ <span class="identifier">moved_object</span><span class="special">(</span><span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">t_</span><span class="special">):</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">interprocess</span><span class="special">::</span><span class="identifier">detail</span><span class="special">::</span><span class="identifier">moved_object</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;(</span><span class="identifier">t_</span><span class="special">)</span> <span class="special">{}</span>
+ <span class="special">};</span>
+
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">interprocess</span><span class="special">::</span><span class="identifier">defer_lock_type</span> <span class="identifier">defer_lock_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">interprocess</span><span class="special">::</span><span class="identifier">accept_ownership_type</span> <span class="identifier">adopt_lock_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">interprocess</span><span class="special">::</span><span class="identifier">try_to_lock_type</span> <span class="identifier">try_to_lock_t</span><span class="special">;</span>
+
+ <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">defer_lock_t</span><span class="special">&amp;</span> <span class="identifier">defer_lock</span><span class="special">()</span> <span class="special">{</span><span class="keyword">return</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">interprocess</span><span class="special">::</span><span class="identifier">defer_lock</span><span class="special">;}</span>
+ <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">adopt_lock_t</span><span class="special">&amp;</span> <span class="identifier">adopt_lock</span><span class="special">()</span> <span class="special">{</span><span class="keyword">return</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">interprocess</span><span class="special">::</span><span class="identifier">accept_ownership</span><span class="special">;}</span>
+ <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">try_to_lock_t</span><span class="special">&amp;</span> <span class="identifier">try_to_lock</span><span class="special">()</span> <span class="special">{</span><span class="keyword">return</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">interprocess</span><span class="special">::</span><span class="identifier">try_to_lock</span><span class="special">;}</span>
+<span class="special">};</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.multi_process.thread_lockable_scope_traits_hpp.template_class_specialization__lockable_scope_traits_multi_process_tag__lockable__"></a><a href="multi_process.html#boost_synchro.reference.multi_process.thread_lockable_scope_traits_hpp.template_class_specialization__lockable_scope_traits_multi_process_tag__lockable__" title="Template
+ Class Specialization lockable_scope_traits&lt;multi_process_tag, Lockable&gt;">Template
+ Class Specialization <code class="computeroutput"><span class="identifier">lockable_scope_traits</span><span class="special">&lt;</span><span class="identifier">multi_process_tag</span><span class="special">,</span> <span class="identifier">Lockable</span><span class="special">&gt;</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">lockable_scope_traits</span><span class="special">&lt;</span><span class="identifier">multi_process_tag</span><span class="special">,</span> <span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="special">:</span> <span class="identifier">scope_traits</span><span class="special">&lt;</span><span class="identifier">multi_process_tag</span><span class="special">&gt;</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">Lockable</span> <span class="identifier">lockable_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">interprocess</span><span class="special">::</span><span class="identifier">scoped_lock</span><span class="special">&lt;</span><span class="identifier">lockable_type</span><span class="special">&gt;</span> <span class="identifier">scoped_lock</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">interprocess</span><span class="special">::</span><span class="identifier">scoped_lock</span><span class="special">&lt;</span><span class="identifier">lockable_type</span><span class="special">&gt;</span> <span class="identifier">unique_lock</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">interprocess</span><span class="special">::</span><span class="identifier">sharable_lock</span><span class="special">&lt;</span><span class="identifier">lockable_type</span><span class="special">&gt;</span> <span class="identifier">shared_lock</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">interprocess</span><span class="special">::</span><span class="identifier">upgradable_lock</span><span class="special">&lt;</span><span class="identifier">lockable_type</span><span class="special">&gt;</span> <span class="identifier">upgrade_lock</span><span class="special">;</span>
+
+<span class="special">};</span>
+</pre>
+</div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.multi_process.process_synchronization_family_hpp"></a><a href="multi_process.html#boost_synchro.reference.multi_process.process_synchronization_family_hpp" title="
+ Header &lt;boost/synchro/process_synchronization_family.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">process_synchronization_family</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl><dt><span class="section"><a href="multi_process.html#boost_synchro.reference.multi_process.process_synchronization_family_hpp.class__process_synchronization_family_">Class
+ <code class="computeroutput"><span class="identifier">process_synchronization_family</span></code></a></span></dt></dl></div>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">synchro</span> <span class="special">{</span>
+ <span class="keyword">struct</span> <span class="identifier">process_synchronization_family</span><span class="special">;</span>
+<span class="special">}}</span>
+</pre>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.multi_process.process_synchronization_family_hpp.class__process_synchronization_family_"></a><a href="multi_process.html#boost_synchro.reference.multi_process.process_synchronization_family_hpp.class__process_synchronization_family_" title="Class
+ process_synchronization_family">Class
+ <code class="computeroutput"><span class="identifier">process_synchronization_family</span></code></a>
+</h5></div></div></div>
+<p>
+ <span class="bold"><strong>Synopsis</strong></span>
+ </p>
+<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">process_synchronization_family</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">synchro</span><span class="special">::</span><span class="identifier">interprocess_mutex</span> <span class="identifier">mutex_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">synchro</span><span class="special">::</span><span class="identifier">interprocess_recursive_mutex</span> <span class="identifier">recursive_mutex_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">synchro</span><span class="special">::</span><span class="identifier">interprocess_mutex</span> <span class="identifier">timed_mutex_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">synchro</span><span class="special">::</span><span class="identifier">interprocess_recursive_mutex</span> <span class="identifier">recursive_timed_mutex_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">synchro</span><span class="special">::</span><span class="identifier">interprocess_upgradable_mutex</span> <span class="identifier">shared_mutex_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">interprocess</span><span class="special">::</span><span class="identifier">interprocess_condition</span> <span class="identifier">condition_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">interprocess</span><span class="special">::</span><span class="identifier">interprocess_condition</span> <span class="identifier">condition_any_type</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+</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"><div class="copyright-footer">Copyright © 2008 Vicente J. Botet Escriba<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="multi_threaded.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="polymorphic_locks.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/synchro/libs/synchro/doc/html/boost_synchro/reference/multi_threaded.html
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/html/boost_synchro/reference/multi_threaded.html 2009-10-12 17:49:35 EDT (Mon, 12 Oct 2009)
@@ -0,0 +1,745 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Multi-threaded</title>
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+<link rel="start" href="../../index.html" title="Chapter 1. Boost.Synchro">
+<link rel="up" href="../reference.html" title="Reference">
+<link rel="prev" href="single_threaded.html" title="Single-threaded">
+<link rel="next" href="multi_process.html" title="Multi-process">
+</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">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="single_threaded.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="multi_process.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_synchro.reference.multi_threaded"></a>Multi-threaded
+</h3></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="multi_threaded.html#boost_synchro.reference.multi_threaded.thread_lockable_scope_traits_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">thread</span><span class="special">/</span><span class="identifier">lockable_scope_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="multi_threaded.html#boost_synchro.reference.multi_threaded.thread_lockable_scope_traits_hpp.template_class_specialization__scope_traits_multi_threaded_tag__">Template
+ Class Specialization <code class="computeroutput"><span class="identifier">scope_traits</span><span class="special">&lt;</span><span class="identifier">multi_threaded_tag</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="multi_threaded.html#boost_synchro.reference.multi_threaded.thread_lockable_scope_traits_hpp.template_class_specialization__lockable_scope_traits_multi_threaded_tag__lockable__">Template
+ Class Specialization <code class="computeroutput"><span class="identifier">lockable_scope_traits</span><span class="special">&lt;</span><span class="identifier">multi_threaded_tag</span><span class="special">,</span> <span class="identifier">Lockable</span><span class="special">&gt;</span></code></a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="multi_threaded.html#boost_synchro.reference.multi_threaded.thread_mutex_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">thread</span><span class="special">/</span><span class="identifier">mutex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="multi_threaded.html#boost_synchro.reference.multi_threaded.thread_mutex_hpp.class__thread_mutex_">Class
+ <code class="computeroutput"><span class="identifier">thread_mutex</span></code></a></span></dt>
+<dt><span class="section"><a href="multi_threaded.html#boost_synchro.reference.multi_threaded.thread_mutex_hpp.class__thread_timed_mutex_">Class
+ <code class="computeroutput"><span class="identifier">thread_timed_mutex</span></code></a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="multi_threaded.html#boost_synchro.reference.multi_threaded.thread_recursive_mutex_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">thread_recursive_mutex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="multi_threaded.html#boost_synchro.reference.multi_threaded.thread_recursive_mutex_hpp.class__thread_recursive_mutex_">Class
+ <code class="computeroutput"><span class="identifier">thread_recursive_mutex</span></code></a></span></dt>
+<dt><span class="section"><a href="multi_threaded.html#boost_synchro.reference.multi_threaded.thread_recursive_mutex_hpp.class__thread_recursive_timed_mutex_">Class
+ <code class="computeroutput"><span class="identifier">thread_recursive_timed_mutex</span></code></a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="multi_threaded.html#boost_synchro.reference.multi_threaded.thread_shared_mutex_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">thread</span><span class="special">/</span><span class="identifier">shared_mutex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dd><dl><dt><span class="section"><a href="multi_threaded.html#boost_synchro.reference.multi_threaded.thread_shared_mutex_hpp.class__thread_shared_mutex_">Class
+ <code class="computeroutput"><span class="identifier">thread_shared_mutex</span></code></a></span></dt></dl></dd>
+<dt><span class="section"><a href="multi_threaded.html#boost_synchro.reference.multi_threaded.thread_locks_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">thread</span><span class="special">/</span><span class="identifier">locks</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="multi_threaded.html#boost_synchro.reference.multi_threaded.thread_locks_hpp.template_class__unique_locker___">Template
+ Class <code class="computeroutput"><span class="identifier">unique_locker</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="multi_threaded.html#boost_synchro.reference.multi_threaded.thread_locks_hpp.template_class__try_unique_locker___">Template
+ Class <code class="computeroutput"><span class="identifier">try_unique_locker</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="multi_threaded.html#boost_synchro.reference.multi_threaded.thread_locks_hpp.template_class__shared_locker___">Template
+ Class <code class="computeroutput"><span class="identifier">shared_locker</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="multi_threaded.html#boost_synchro.reference.multi_threaded.thread_locks_hpp.template_class__upgrade_locker___">Template
+ Class <code class="computeroutput"><span class="identifier">upgrade_locker</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="multi_threaded.html#boost_synchro.reference.multi_threaded.thread_locks_hpp.template_class__upgrade_to_unique_locker___">Template
+ Class <code class="computeroutput"><span class="identifier">upgrade_to_unique_locker</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="multi_threaded.html#boost_synchro.reference.multi_threaded.thread_synchronization_family_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">thread_synchronization_family</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dd><dl><dt><span class="section"><a href="multi_threaded.html#boost_synchro.reference.multi_threaded.thread_synchronization_family_hpp.class__thread_synchronization_family_">Class
+ <code class="computeroutput"><span class="identifier">thread_synchronization_family</span></code></a></span></dt></dl></dd>
+</dl></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.multi_threaded.thread_lockable_scope_traits_hpp"></a><a href="multi_threaded.html#boost_synchro.reference.multi_threaded.thread_lockable_scope_traits_hpp" title="
+ Header &lt;boost/synchro/thread/lockable_scope_traits.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">thread</span><span class="special">/</span><span class="identifier">lockable_scope_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="multi_threaded.html#boost_synchro.reference.multi_threaded.thread_lockable_scope_traits_hpp.template_class_specialization__scope_traits_multi_threaded_tag__">Template
+ Class Specialization <code class="computeroutput"><span class="identifier">scope_traits</span><span class="special">&lt;</span><span class="identifier">multi_threaded_tag</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="multi_threaded.html#boost_synchro.reference.multi_threaded.thread_lockable_scope_traits_hpp.template_class_specialization__lockable_scope_traits_multi_threaded_tag__lockable__">Template
+ Class Specialization <code class="computeroutput"><span class="identifier">lockable_scope_traits</span><span class="special">&lt;</span><span class="identifier">multi_threaded_tag</span><span class="special">,</span> <span class="identifier">Lockable</span><span class="special">&gt;</span></code></a></span></dt>
+</dl></div>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">synchro</span> <span class="special">{</span>
+ <span class="keyword">template</span><span class="special">&lt;&gt;</span> <span class="keyword">struct</span> <span class="identifier">scope_traits</span><span class="special">&lt;</span><span class="identifier">multi_threaded_tag</span><span class="special">&gt;;</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">lockable_scope_traits</span><span class="special">&lt;</span><span class="identifier">multi_threaded_tag</span><span class="special">,</span> <span class="identifier">Lockable</span><span class="special">&gt;;</span>
+<span class="special">}}</span>
+</pre>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.multi_threaded.thread_lockable_scope_traits_hpp.template_class_specialization__scope_traits_multi_threaded_tag__"></a><a href="multi_threaded.html#boost_synchro.reference.multi_threaded.thread_lockable_scope_traits_hpp.template_class_specialization__scope_traits_multi_threaded_tag__" title="Template
+ Class Specialization scope_traits&lt;multi_threaded_tag&gt;">Template
+ Class Specialization <code class="computeroutput"><span class="identifier">scope_traits</span><span class="special">&lt;</span><span class="identifier">multi_threaded_tag</span><span class="special">&gt;</span></code></a>
+</h5></div></div></div>
+<p>
+ <span class="bold"><strong>Synopsis</strong></span>
+ </p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;&gt;</span> <span class="keyword">struct</span> <span class="identifier">scope_traits</span><span class="special">&lt;</span><span class="identifier">multi_threaded_tag</span><span class="special">&gt;</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">lock_error</span> <span class="identifier">lock_error</span><span class="special">;</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">moved_object</span> <span class="special">:</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">detail</span><span class="special">::</span><span class="identifier">thread_move_t</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="special">{</span>
+ <span class="identifier">moved_object</span><span class="special">(</span><span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">t_</span><span class="special">):</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">detail</span><span class="special">::</span><span class="identifier">thread_move_t</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;(</span><span class="identifier">t_</span><span class="special">)</span> <span class="special">{}</span>
+ <span class="special">};</span>
+
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">defer_lock_t</span> <span class="identifier">defer_lock_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adopt_lock_t</span> <span class="identifier">adopt_lock_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">try_to_lock_t</span> <span class="identifier">try_to_lock_t</span><span class="special">;</span>
+
+ <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">defer_lock_t</span><span class="special">&amp;</span> <span class="identifier">defer_lock</span><span class="special">()</span> <span class="special">{</span><span class="keyword">return</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">defer_lock</span><span class="special">;}</span>
+ <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">adopt_lock_t</span><span class="special">&amp;</span> <span class="identifier">adopt_lock</span><span class="special">()</span> <span class="special">{</span><span class="keyword">return</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adopt_lock</span><span class="special">;}</span>
+ <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">try_to_lock_t</span><span class="special">&amp;</span> <span class="identifier">try_to_lock</span><span class="special">()</span> <span class="special">{</span><span class="keyword">return</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">try_to_lock</span><span class="special">;}</span>
+<span class="special">};</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.multi_threaded.thread_lockable_scope_traits_hpp.template_class_specialization__lockable_scope_traits_multi_threaded_tag__lockable__"></a><a href="multi_threaded.html#boost_synchro.reference.multi_threaded.thread_lockable_scope_traits_hpp.template_class_specialization__lockable_scope_traits_multi_threaded_tag__lockable__" title="Template
+ Class Specialization lockable_scope_traits&lt;multi_threaded_tag, Lockable&gt;">Template
+ Class Specialization <code class="computeroutput"><span class="identifier">lockable_scope_traits</span><span class="special">&lt;</span><span class="identifier">multi_threaded_tag</span><span class="special">,</span> <span class="identifier">Lockable</span><span class="special">&gt;</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">lockable_scope_traits</span><span class="special">&lt;</span><span class="identifier">multi_threaded_tag</span><span class="special">,</span> <span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="special">:</span> <span class="identifier">scope_traits</span><span class="special">&lt;</span><span class="identifier">multi_threaded_tag</span><span class="special">&gt;</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">Lockable</span> <span class="identifier">lockable_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">unique_lock</span><span class="special">&lt;</span><span class="identifier">lockable_type</span><span class="special">&gt;</span> <span class="identifier">scoped_lock</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">unique_lock</span><span class="special">&lt;</span><span class="identifier">lockable_type</span><span class="special">&gt;</span> <span class="identifier">unique_lock</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">shared_lock</span><span class="special">&lt;</span><span class="identifier">lockable_type</span><span class="special">&gt;</span> <span class="identifier">shared_lock</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">upgrade_lock</span><span class="special">&lt;</span><span class="identifier">lockable_type</span><span class="special">&gt;</span> <span class="identifier">upgrade_lock</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+</div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.multi_threaded.thread_mutex_hpp"></a><a href="multi_threaded.html#boost_synchro.reference.multi_threaded.thread_mutex_hpp" title="
+ Header &lt;boost/synchro/thread/mutex.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">thread</span><span class="special">/</span><span class="identifier">mutex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="multi_threaded.html#boost_synchro.reference.multi_threaded.thread_mutex_hpp.class__thread_mutex_">Class
+ <code class="computeroutput"><span class="identifier">thread_mutex</span></code></a></span></dt>
+<dt><span class="section"><a href="multi_threaded.html#boost_synchro.reference.multi_threaded.thread_mutex_hpp.class__thread_timed_mutex_">Class
+ <code class="computeroutput"><span class="identifier">thread_timed_mutex</span></code></a></span></dt>
+</dl></div>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">synchro</span> <span class="special">{</span>
+ <span class="keyword">class</span> <span class="identifier">thread_mutex</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;&gt;</span> <span class="keyword">struct</span> <span class="identifier">unique_lock_type</span><span class="special">&lt;</span><span class="identifier">thread_mutex</span><span class="special">&gt;;</span>
+ <span class="keyword">template</span> <span class="special">&lt;&gt;</span> <span class="keyword">struct</span> <span class="identifier">shared_lock_type</span><span class="special">&lt;</span><span class="identifier">thread_mutex</span><span class="special">&gt;;</span>
+ <span class="keyword">template</span> <span class="special">&lt;&gt;</span> <span class="keyword">struct</span> <span class="identifier">upgrade_lock_type</span><span class="special">&lt;</span><span class="identifier">thread_mutex</span><span class="special">&gt;;</span>
+ <span class="keyword">template</span> <span class="special">&lt;&gt;</span> <span class="keyword">struct</span> <span class="identifier">upgrade_to_unique_locker_type</span><span class="special">&lt;</span><span class="identifier">thread_mutex</span><span class="special">&gt;;</span>
+ <span class="keyword">template</span> <span class="special">&lt;&gt;</span> <span class="keyword">struct</span> <span class="identifier">lock_error_type</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mutex</span><span class="special">&gt;;</span>
+
+ <span class="keyword">class</span> <span class="identifier">thread_timed_mutex</span><span class="special">;</span>
+<span class="special">}}</span>
+</pre>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.multi_threaded.thread_mutex_hpp.class__thread_mutex_"></a><a href="multi_threaded.html#boost_synchro.reference.multi_threaded.thread_mutex_hpp.class__thread_mutex_" title="Class
+ thread_mutex">Class
+ <code class="computeroutput"><span class="identifier">thread_mutex</span></code></a>
+</h5></div></div></div>
+<p>
+ <span class="bold"><strong>Synopsis</strong></span>
+ </p>
+<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">thread_mutex</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">lock_traits_base</span><span class="special">&lt;</span>
+ <span class="identifier">multi_threaded_tag</span><span class="special">,</span>
+ <span class="identifier">exclusive_lock_tag</span><span class="special">,</span>
+ <span class="identifier">non_recursive_tag</span><span class="special">,</span>
+ <span class="identifier">hasnt_timed_interface_tag</span><span class="special">,</span>
+ <span class="identifier">process_lifetime_tag</span><span class="special">,</span>
+ <span class="identifier">anonymous_tag</span><span class="special">,</span>
+ <span class="identifier">mutex</span>
+ <span class="special">&gt;</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="comment">// public types
+</span> <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">condition_variable</span> <span class="identifier">best_condition_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">condition_variable_any</span> <span class="identifier">best_condition_any_type</span><span class="special">;</span>
+
+ <span class="comment">//Non-copyable
+</span> <span class="identifier">BOOST_COPY_CONSTRUCTOR_DELETE</span><span class="special">(</span><span class="identifier">thread_mutex</span><span class="special">)</span> <span class="comment">/*&lt; disable copy construction &gt;*/</span>
+ <span class="identifier">BOOST_COPY_ASSIGNEMENT_DELETE</span><span class="special">(</span><span class="identifier">thread_mutex</span><span class="special">)</span> <span class="comment">/*&lt; disable copy asignement &gt;*/</span>
+
+ <span class="identifier">thread_mutex</span><span class="special">()</span> <span class="special">{}</span>
+<span class="special">};</span>
+
+<span class="keyword">template</span> <span class="special">&lt;&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">unique_lock_type</span><span class="special">&lt;</span><span class="identifier">thread_mutex</span><span class="special">&gt;</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">unique_lock</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mutex</span><span class="special">&gt;</span> <span class="identifier">type</span><span class="special">;</span>
+<span class="special">};</span>
+
+<span class="keyword">template</span> <span class="special">&lt;&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">shared_lock_type</span><span class="special">&lt;</span><span class="identifier">thread_mutex</span><span class="special">&gt;</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">shared_lock</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mutex</span><span class="special">&gt;</span> <span class="identifier">type</span><span class="special">;</span>
+<span class="special">};</span>
+
+<span class="keyword">template</span> <span class="special">&lt;&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">upgrade_lock_type</span><span class="special">&lt;</span><span class="identifier">thread_mutex</span><span class="special">&gt;</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">upgrade_lock</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mutex</span><span class="special">&gt;</span> <span class="identifier">type</span><span class="special">;</span>
+<span class="special">};</span>
+
+<span class="keyword">template</span> <span class="special">&lt;&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">upgrade_to_unique_locker_type</span><span class="special">&lt;</span><span class="identifier">thread_mutex</span><span class="special">&gt;</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">upgrade_to_unique_lock</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mutex</span><span class="special">&gt;</span> <span class="identifier">type</span><span class="special">;</span>
+<span class="special">};</span>
+
+<span class="keyword">template</span> <span class="special">&lt;&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">lock_error_type</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mutex</span><span class="special">&gt;</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">lock_error</span> <span class="identifier">type</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.multi_threaded.thread_mutex_hpp.class__thread_timed_mutex_"></a><a href="multi_threaded.html#boost_synchro.reference.multi_threaded.thread_mutex_hpp.class__thread_timed_mutex_" title="Class
+ thread_timed_mutex">Class
+ <code class="computeroutput"><span class="identifier">thread_timed_mutex</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">thread_timed_mutex</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">lock_traits_base</span><span class="special">&lt;</span>
+ <span class="identifier">multi_threaded_tag</span><span class="special">,</span>
+ <span class="identifier">exclusive_lock_tag</span><span class="special">,</span>
+ <span class="identifier">non_recursive_tag</span><span class="special">,</span>
+ <span class="identifier">has_timed_interface_tag</span><span class="special">,</span>
+ <span class="identifier">process_lifetime_tag</span><span class="special">,</span>
+ <span class="identifier">anonymous_tag</span><span class="special">,</span>
+ <span class="identifier">timed_mutex</span>
+ <span class="special">&gt;</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">condition_variable_any</span> <span class="identifier">best_condition_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">condition_variable_any</span> <span class="identifier">best_condition_any_type</span><span class="special">;</span>
+
+ <span class="comment">//Non-copyable
+</span> <span class="identifier">BOOST_COPY_CONSTRUCTOR_DELETE</span><span class="special">(</span><span class="identifier">thread_timed_mutex</span><span class="special">)</span> <span class="comment">/*&lt; disable copy construction &gt;*/</span>
+ <span class="identifier">BOOST_COPY_ASSIGNEMENT_DELETE</span><span class="special">(</span><span class="identifier">thread_timed_mutex</span><span class="special">)</span> <span class="comment">/*&lt; disable copy asignement &gt;*/</span>
+ <span class="identifier">thread_timed_mutex</span> <span class="special">();</span>
+
+ <span class="keyword">bool</span> <span class="identifier">try_lock_until</span><span class="special">(</span><span class="identifier">system_time</span> <span class="keyword">const</span> <span class="special">&amp;</span> <span class="identifier">abs_time</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">TimeDuration</span><span class="special">&gt;</span>
+ <span class="keyword">bool</span> <span class="identifier">try_lock_for</span><span class="special">(</span><span class="identifier">TimeDuration</span> <span class="keyword">const</span> <span class="special">&amp;</span> <span class="identifier">relative_time</span><span class="special">);</span>
+
+ <span class="keyword">void</span> <span class="identifier">lock_until</span><span class="special">(</span><span class="identifier">system_time</span> <span class="keyword">const</span> <span class="special">&amp;</span> <span class="identifier">abs_time</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">TimeDuration</span><span class="special">&gt;</span>
+ <span class="keyword">void</span> <span class="identifier">lock_for</span><span class="special">(</span><span class="identifier">TimeDuration</span> <span class="keyword">const</span> <span class="special">&amp;</span> <span class="identifier">relative_time</span><span class="special">);</span>
+<span class="special">};</span>
+</pre>
+</div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.multi_threaded.thread_recursive_mutex_hpp"></a><a href="multi_threaded.html#boost_synchro.reference.multi_threaded.thread_recursive_mutex_hpp" title="
+ Header &lt;boost/synchro/thread_recursive_mutex.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">thread_recursive_mutex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="multi_threaded.html#boost_synchro.reference.multi_threaded.thread_recursive_mutex_hpp.class__thread_recursive_mutex_">Class
+ <code class="computeroutput"><span class="identifier">thread_recursive_mutex</span></code></a></span></dt>
+<dt><span class="section"><a href="multi_threaded.html#boost_synchro.reference.multi_threaded.thread_recursive_mutex_hpp.class__thread_recursive_timed_mutex_">Class
+ <code class="computeroutput"><span class="identifier">thread_recursive_timed_mutex</span></code></a></span></dt>
+</dl></div>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">synchro</span> <span class="special">{</span>
+ <span class="keyword">class</span> <span class="identifier">thread_recursive_mutex</span><span class="special">;</span>
+
+ <span class="keyword">class</span> <span class="identifier">thread_timed_mutex</span><span class="special">;</span>
+<span class="special">}}</span>
+</pre>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.multi_threaded.thread_recursive_mutex_hpp.class__thread_recursive_mutex_"></a><a href="multi_threaded.html#boost_synchro.reference.multi_threaded.thread_recursive_mutex_hpp.class__thread_recursive_mutex_" title="Class
+ thread_recursive_mutex">Class
+ <code class="computeroutput"><span class="identifier">thread_recursive_mutex</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">thread_recursive_mutex</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">lock_traits_base</span><span class="special">&lt;</span>
+ <span class="identifier">multi_threaded_tag</span><span class="special">,</span>
+ <span class="identifier">exclusive_lock_tag</span><span class="special">,</span>
+ <span class="identifier">recursive_tag</span><span class="special">,</span>
+ <span class="identifier">hasnt_timed_interface_tag</span><span class="special">,</span>
+ <span class="identifier">process_lifetime_tag</span><span class="special">,</span>
+ <span class="identifier">anonymous_tag</span><span class="special">,</span>
+ <span class="identifier">recursive_mutex</span>
+ <span class="special">&gt;</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">condition_variable_any</span> <span class="identifier">best_condition_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">condition_variable_any</span> <span class="identifier">best_condition_any_type</span><span class="special">;</span>
+
+ <span class="comment">//Non-copyable
+</span> <span class="identifier">BOOST_COPY_CONSTRUCTOR_DELETE</span><span class="special">(</span><span class="identifier">thread_recursive_mutex</span><span class="special">)</span> <span class="comment">/*&lt; disable copy construction &gt;*/</span>
+ <span class="identifier">BOOST_COPY_ASSIGNEMENT_DELETE</span><span class="special">(</span><span class="identifier">thread_recursive_mutex</span><span class="special">)</span> <span class="comment">/*&lt; disable copy asignement &gt;*/</span>
+ <span class="identifier">thread_recursive_mutex</span><span class="special">()</span> <span class="special">{}</span>
+<span class="special">};</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.multi_threaded.thread_recursive_mutex_hpp.class__thread_recursive_timed_mutex_"></a><a href="multi_threaded.html#boost_synchro.reference.multi_threaded.thread_recursive_mutex_hpp.class__thread_recursive_timed_mutex_" title="Class
+ thread_recursive_timed_mutex">Class
+ <code class="computeroutput"><span class="identifier">thread_recursive_timed_mutex</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">thread_recursive_timed_mutex</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">lock_traits_base</span><span class="special">&lt;</span>
+ <span class="identifier">multi_threaded_tag</span><span class="special">,</span>
+ <span class="identifier">exclusive_lock_tag</span><span class="special">,</span>
+ <span class="identifier">recursive_tag</span><span class="special">,</span>
+ <span class="identifier">has_timed_interface_tag</span><span class="special">,</span>
+ <span class="identifier">process_lifetime_tag</span><span class="special">,</span>
+ <span class="identifier">anonymous_tag</span><span class="special">,</span>
+ <span class="identifier">recursive_timed_mutex</span>
+ <span class="special">&gt;</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">condition_variable_any</span> <span class="identifier">best_condition_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">condition_variable_any</span> <span class="identifier">best_condition_any_type</span><span class="special">;</span>
+
+ <span class="comment">//Non-copyable
+</span> <span class="identifier">BOOST_COPY_CONSTRUCTOR_DELETE</span><span class="special">(</span><span class="identifier">thread_recursive_timed_mutex</span><span class="special">)</span> <span class="comment">/*&lt; disable copy construction &gt;*/</span>
+ <span class="identifier">BOOST_COPY_ASSIGNEMENT_DELETE</span><span class="special">(</span><span class="identifier">thread_recursive_timed_mutex</span><span class="special">)</span> <span class="comment">/*&lt; disable copy asignement &gt;*/</span>
+ <span class="identifier">thread_recursive_timed_mutex</span><span class="special">();</span>
+
+ <span class="keyword">bool</span> <span class="identifier">try_lock_until</span><span class="special">(</span><span class="identifier">system_time</span> <span class="keyword">const</span> <span class="special">&amp;</span> <span class="identifier">abs_time</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">TimeDuration</span><span class="special">&gt;</span>
+ <span class="keyword">bool</span> <span class="identifier">try_lock_for</span><span class="special">(</span><span class="identifier">TimeDuration</span> <span class="keyword">const</span> <span class="special">&amp;</span> <span class="identifier">relative_time</span><span class="special">);</span>
+
+ <span class="keyword">void</span> <span class="identifier">lock_until</span><span class="special">(</span><span class="identifier">system_time</span> <span class="keyword">const</span> <span class="special">&amp;</span> <span class="identifier">abs_time</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">TimeDuration</span><span class="special">&gt;</span>
+ <span class="keyword">void</span> <span class="identifier">lock_for</span><span class="special">(</span><span class="identifier">TimeDuration</span> <span class="keyword">const</span> <span class="special">&amp;</span> <span class="identifier">relative_time</span><span class="special">);</span>
+
+<span class="special">};</span>
+</pre>
+</div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.multi_threaded.thread_shared_mutex_hpp"></a><a href="multi_threaded.html#boost_synchro.reference.multi_threaded.thread_shared_mutex_hpp" title="
+ Header &lt;boost/synchro/thread/shared_mutex.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">thread</span><span class="special">/</span><span class="identifier">shared_mutex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl><dt><span class="section"><a href="multi_threaded.html#boost_synchro.reference.multi_threaded.thread_shared_mutex_hpp.class__thread_shared_mutex_">Class
+ <code class="computeroutput"><span class="identifier">thread_shared_mutex</span></code></a></span></dt></dl></div>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">synchro</span> <span class="special">{</span>
+ <span class="keyword">class</span> <span class="identifier">thread_recursive_mutex</span><span class="special">;</span>
+
+ <span class="keyword">class</span> <span class="identifier">thread_timed_mutex</span><span class="special">;</span>
+<span class="special">}}</span>
+</pre>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.multi_threaded.thread_shared_mutex_hpp.class__thread_shared_mutex_"></a><a href="multi_threaded.html#boost_synchro.reference.multi_threaded.thread_shared_mutex_hpp.class__thread_shared_mutex_" title="Class
+ thread_shared_mutex">Class
+ <code class="computeroutput"><span class="identifier">thread_shared_mutex</span></code></a>
+</h5></div></div></div>
+<p>
+ <span class="bold"><strong>Synopsis</strong></span>
+ </p>
+<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">thread_shared_mutex</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">lock_traits_base</span><span class="special">&lt;</span>
+ <span class="identifier">multi_threaded_tag</span><span class="special">,</span>
+ <span class="identifier">upgradable_lock_tag</span><span class="special">,</span>
+ <span class="identifier">non_recursive_tag</span><span class="special">,</span>
+ <span class="identifier">has_timed_interface_tag</span><span class="special">,</span>
+ <span class="identifier">process_lifetime_tag</span><span class="special">,</span>
+ <span class="identifier">anonymous_tag</span><span class="special">,</span>
+ <span class="identifier">shared_mutex</span>
+ <span class="special">&gt;</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">condition_variable_any</span> <span class="identifier">best_condition_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">condition_variable_any</span> <span class="identifier">best_condition_any_type</span><span class="special">;</span>
+
+ <span class="comment">//Non-copyable
+</span> <span class="identifier">BOOST_COPY_CONSTRUCTOR_DELETE</span><span class="special">(</span><span class="identifier">thread_shared_mutex</span><span class="special">)</span> <span class="comment">/*&lt; disable copy construction &gt;*/</span>
+ <span class="identifier">BOOST_COPY_ASSIGNEMENT_DELETE</span><span class="special">(</span><span class="identifier">thread_shared_mutex</span><span class="special">)</span> <span class="comment">/*&lt; disable copy asignement &gt;*/</span>
+ <span class="identifier">thread_shared_mutex</span><span class="special">();</span>
+
+ <span class="keyword">bool</span> <span class="identifier">try_lock_until</span><span class="special">(</span><span class="identifier">system_time</span> <span class="keyword">const</span> <span class="special">&amp;</span> <span class="identifier">abs_time</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">TimeDuration</span><span class="special">&gt;</span>
+ <span class="keyword">bool</span> <span class="identifier">try_lock_for</span><span class="special">(</span><span class="identifier">TimeDuration</span> <span class="keyword">const</span> <span class="special">&amp;</span> <span class="identifier">relative_time</span><span class="special">);</span>
+
+ <span class="keyword">void</span> <span class="identifier">lock_until</span><span class="special">(</span><span class="identifier">system_time</span> <span class="keyword">const</span> <span class="special">&amp;</span> <span class="identifier">abs_time</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">TimeDuration</span><span class="special">&gt;</span>
+ <span class="keyword">void</span> <span class="identifier">lock_for</span><span class="special">(</span><span class="identifier">TimeDuration</span> <span class="keyword">const</span> <span class="special">&amp;</span> <span class="identifier">relative_time</span><span class="special">);</span>
+
+ <span class="keyword">bool</span> <span class="identifier">try_lock_shared_until</span><span class="special">(</span><span class="identifier">system_time</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">abs_time</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">TimeDuration</span><span class="special">&gt;</span>
+ <span class="keyword">bool</span> <span class="identifier">try_lock_shared_for</span><span class="special">(</span><span class="identifier">TimeDuration</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">rel_time</span><span class="special">);</span>
+
+ <span class="keyword">void</span> <span class="identifier">lock_shared_until</span><span class="special">(</span><span class="identifier">system_time</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">abs_time</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">TimeDuration</span><span class="special">&gt;</span>
+ <span class="keyword">void</span> <span class="identifier">lock_shared_for</span><span class="special">(</span><span class="identifier">TimeDuration</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">abs_time</span><span class="special">);</span>
+
+<span class="special">};</span>
+</pre>
+</div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.multi_threaded.thread_locks_hpp"></a><a href="multi_threaded.html#boost_synchro.reference.multi_threaded.thread_locks_hpp" title="
+ Header &lt;boost/synchro/thread/locks.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">thread</span><span class="special">/</span><span class="identifier">locks</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="multi_threaded.html#boost_synchro.reference.multi_threaded.thread_locks_hpp.template_class__unique_locker___">Template
+ Class <code class="computeroutput"><span class="identifier">unique_locker</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="multi_threaded.html#boost_synchro.reference.multi_threaded.thread_locks_hpp.template_class__try_unique_locker___">Template
+ Class <code class="computeroutput"><span class="identifier">try_unique_locker</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="multi_threaded.html#boost_synchro.reference.multi_threaded.thread_locks_hpp.template_class__shared_locker___">Template
+ Class <code class="computeroutput"><span class="identifier">shared_locker</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="multi_threaded.html#boost_synchro.reference.multi_threaded.thread_locks_hpp.template_class__upgrade_locker___">Template
+ Class <code class="computeroutput"><span class="identifier">upgrade_locker</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="multi_threaded.html#boost_synchro.reference.multi_threaded.thread_locks_hpp.template_class__upgrade_to_unique_locker___">Template
+ Class <code class="computeroutput"><span class="identifier">upgrade_to_unique_locker</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+</dl></div>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">synchro</span> <span class="special">{</span>
+ <span class="keyword">class</span> <span class="identifier">thread_recursive_mutex</span><span class="special">;</span>
+
+ <span class="keyword">class</span> <span class="identifier">thread_timed_mutex</span><span class="special">;</span>
+<span class="special">}}</span>
+</pre>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.multi_threaded.thread_locks_hpp.template_class__unique_locker___"></a><a href="multi_threaded.html#boost_synchro.reference.multi_threaded.thread_locks_hpp.template_class__unique_locker___" title="Template
+ Class unique_locker&lt;&gt;">Template
+ Class <code class="computeroutput"><span class="identifier">unique_locker</span><span class="special">&lt;&gt;</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">lockable_type</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">unique_lock</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">T</span> <span class="identifier">type</span><span class="special">;</span>
+<span class="special">};</span>
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">lockable_type</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">shared_lock</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">T</span> <span class="identifier">type</span><span class="special">;</span>
+<span class="special">};</span>
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">lockable_type</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">upgrade_lock</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">T</span> <span class="identifier">type</span><span class="special">;</span>
+<span class="special">};</span>
+
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">lockable_type</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">upgrade_to_unique_lock</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">T</span> <span class="identifier">type</span><span class="special">;</span>
+<span class="special">};</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Mutex</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">unique_locker</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">,</span><span class="identifier">multi_threaded_tag</span><span class="special">&gt;:</span> <span class="keyword">public</span> <span class="identifier">unique_lock_type</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="special">{</span>
+ <span class="comment">//typename scope_tag&lt;Mutex&gt;::type == multi_threaded_tag
+</span><span class="keyword">private</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">Mutex</span> <span class="identifier">lockable_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">multi_threaded_tag</span> <span class="identifier">scope_tag_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">unique_lock_type</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">base_type</span><span class="special">;</span>
+
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="identifier">BOOST_NON_CONST_COPY_CONSTRUCTOR_DELETE</span><span class="special">(</span><span class="identifier">unique_locker</span><span class="special">)</span> <span class="comment">/*&lt; disable copy construction &gt;*/</span>
+ <span class="identifier">BOOST_NON_CONST_COPY_ASSIGNEMENT_DELETE</span><span class="special">(</span><span class="identifier">unique_locker</span><span class="special">)</span> <span class="comment">/*&lt; disable copy asignement &gt;*/</span>
+ <span class="identifier">unique_locker</span><span class="special">();</span>
+
+ <span class="keyword">explicit</span> <span class="identifier">unique_locker</span><span class="special">(</span><span class="identifier">Mutex</span><span class="special">&amp;</span> <span class="identifier">m_</span><span class="special">);</span>
+ <span class="identifier">unique_locker</span><span class="special">(</span><span class="identifier">Mutex</span><span class="special">&amp;</span> <span class="identifier">m_</span><span class="special">,</span><span class="identifier">adopt_lock_t</span><span class="special">);</span>
+ <span class="identifier">unique_locker</span><span class="special">(</span><span class="identifier">Mutex</span><span class="special">&amp;</span> <span class="identifier">m_</span><span class="special">,</span><span class="identifier">defer_lock_t</span><span class="special">);</span>
+ <span class="identifier">unique_locker</span><span class="special">(</span><span class="identifier">Mutex</span><span class="special">&amp;</span> <span class="identifier">m_</span><span class="special">,</span><span class="identifier">try_to_lock_t</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">TimeDuration</span><span class="special">&gt;</span>
+ <span class="identifier">unique_locker</span><span class="special">(</span><span class="identifier">Mutex</span><span class="special">&amp;</span> <span class="identifier">m_</span><span class="special">,</span><span class="identifier">TimeDuration</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">target_time</span><span class="special">);</span>
+ <span class="identifier">unique_locker</span><span class="special">(</span><span class="identifier">Mutex</span><span class="special">&amp;</span> <span class="identifier">m_</span><span class="special">,</span><span class="identifier">system_time</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">target_time</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">TimeDuration</span><span class="special">&gt;</span>
+ <span class="identifier">unique_locker</span><span class="special">(</span><span class="identifier">Mutex</span><span class="special">&amp;</span> <span class="identifier">m_</span><span class="special">,</span><span class="identifier">TimeDuration</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">target_time</span><span class="special">,</span> <span class="identifier">throw_lock_t</span><span class="special">);</span>
+ <span class="identifier">unique_locker</span><span class="special">(</span><span class="identifier">Mutex</span><span class="special">&amp;</span> <span class="identifier">m_</span><span class="special">,</span><span class="identifier">system_time</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">target_time</span><span class="special">,</span> <span class="identifier">throw_lock_t</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">TimeDuration</span><span class="special">&gt;</span>
+ <span class="identifier">unique_locker</span><span class="special">(</span><span class="identifier">TimeDuration</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">target_time</span><span class="special">,</span> <span class="identifier">Mutex</span><span class="special">&amp;</span> <span class="identifier">m_</span><span class="special">);</span>
+ <span class="identifier">unique_locker</span><span class="special">(</span><span class="identifier">system_time</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">target_time</span><span class="special">,</span> <span class="identifier">Mutex</span><span class="special">&amp;</span> <span class="identifier">m_</span><span class="special">);</span>
+
+<span class="preprocessor">#ifdef</span> <span class="identifier">BOOST_HAS_RVALUE_REFS</span>
+ <span class="identifier">unique_locker</span><span class="special">(</span><span class="identifier">unique_locker</span><span class="special">&amp;&amp;</span> <span class="identifier">other</span><span class="special">);</span>
+ <span class="keyword">explicit</span> <span class="identifier">unique_locker</span><span class="special">(</span><span class="identifier">upgrade_locker</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">,</span><span class="identifier">scope_tag_type</span><span class="special">&gt;&amp;&amp;</span> <span class="identifier">other</span><span class="special">);</span>
+
+ <span class="identifier">unique_locker</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">,</span> <span class="identifier">scope_tag_type</span><span class="special">&gt;&amp;&amp;</span> <span class="identifier">move</span><span class="special">();</span>
+
+
+ <span class="identifier">unique_locker</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span><span class="identifier">unique_locker</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">,</span> <span class="identifier">scope_tag_type</span><span class="special">&gt;&amp;&amp;</span> <span class="identifier">other</span><span class="special">);</span>
+ <span class="identifier">unique_locker</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span><span class="identifier">upgrade_locker</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">,</span> <span class="identifier">multi_threaded_tag</span><span class="special">&gt;&amp;&amp;</span> <span class="identifier">other</span><span class="special">);</span>
+
+ <span class="keyword">void</span> <span class="identifier">swap</span><span class="special">(</span><span class="identifier">unique_locker</span><span class="special">&amp;&amp;</span> <span class="identifier">other</span><span class="special">);</span>
+<span class="preprocessor">#else</span>
+ <span class="identifier">unique_locker</span><span class="special">(</span><span class="identifier">detail</span><span class="special">::</span><span class="identifier">thread_move_t</span><span class="special">&lt;</span><span class="identifier">unique_locker</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">,</span> <span class="identifier">scope_tag_type</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">other</span><span class="special">);</span>
+ <span class="identifier">unique_locker</span><span class="special">(</span><span class="identifier">detail</span><span class="special">::</span><span class="identifier">thread_move_t</span><span class="special">&lt;</span><span class="identifier">upgrade_locker</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">,</span><span class="identifier">scope_tag_type</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">other</span><span class="special">);</span>
+
+ <span class="keyword">operator</span> <span class="identifier">detail</span><span class="special">::</span><span class="identifier">thread_move_t</span><span class="special">&lt;</span><span class="identifier">unique_locker</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">,</span> <span class="identifier">scope_tag_type</span><span class="special">&gt;</span> <span class="special">&gt;();</span>
+ <span class="identifier">detail</span><span class="special">::</span><span class="identifier">thread_move_t</span><span class="special">&lt;</span><span class="identifier">unique_locker</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">,</span> <span class="identifier">scope_tag_type</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">move</span><span class="special">();</span>
+
+ <span class="identifier">unique_locker</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span><span class="identifier">detail</span><span class="special">::</span><span class="identifier">thread_move_t</span><span class="special">&lt;</span><span class="identifier">unique_locker</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">,</span> <span class="identifier">scope_tag_type</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">other</span><span class="special">);</span>
+ <span class="identifier">unique_locker</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span><span class="identifier">detail</span><span class="special">::</span><span class="identifier">thread_move_t</span><span class="special">&lt;</span><span class="identifier">upgrade_locker</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">,</span> <span class="identifier">scope_tag_type</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">other</span><span class="special">);</span>
+ <span class="keyword">void</span> <span class="identifier">swap</span><span class="special">(</span><span class="identifier">unique_locker</span><span class="special">&amp;</span> <span class="identifier">other</span><span class="special">);</span>
+ <span class="keyword">void</span> <span class="identifier">swap</span><span class="special">(</span><span class="identifier">detail</span><span class="special">::</span><span class="identifier">thread_move_t</span><span class="special">&lt;</span><span class="identifier">unique_locker</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">,</span> <span class="identifier">scope_tag_type</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">other</span><span class="special">);</span>
+<span class="preprocessor">#endif</span>
+
+ <span class="special">~</span><span class="identifier">unique_locker</span><span class="special">()</span> <span class="special">{}</span>
+
+ <span class="identifier">Mutex</span><span class="special">*</span> <span class="identifier">mutex</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="keyword">bool</span> <span class="identifier">is_locking</span><span class="special">(</span><span class="identifier">lockable_type</span><span class="special">*</span> <span class="identifier">l</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">TimeDuration</span><span class="special">&gt;</span>
+ <span class="keyword">bool</span> <span class="identifier">try_lock_for</span><span class="special">(</span><span class="identifier">TimeDuration</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">relative_time</span><span class="special">);</span>
+ <span class="keyword">bool</span> <span class="identifier">try_lock_until</span><span class="special">(::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">system_time</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">absolute_time</span><span class="special">);</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">TimeDuration</span><span class="special">&gt;</span>
+ <span class="keyword">void</span> <span class="identifier">lock_for</span><span class="special">(</span><span class="identifier">TimeDuration</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">relative_time</span><span class="special">);</span>
+ <span class="keyword">void</span> <span class="identifier">lock_until</span><span class="special">(::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">system_time</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">absolute_time</span><span class="special">);</span>
+<span class="special">};</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.multi_threaded.thread_locks_hpp.template_class__try_unique_locker___"></a><a href="multi_threaded.html#boost_synchro.reference.multi_threaded.thread_locks_hpp.template_class__try_unique_locker___" title="Template
+ Class try_unique_locker&lt;&gt;">Template
+ Class <code class="computeroutput"><span class="identifier">try_unique_locker</span><span class="special">&lt;&gt;</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Mutex</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">try_unique_locker</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">,</span><span class="identifier">multi_threaded_tag</span><span class="special">&gt;:</span> <span class="keyword">public</span> <span class="identifier">unique_locker</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">,</span><span class="identifier">multi_threaded_tag</span><span class="special">&gt;</span> <span class="special">{</span>
+ <span class="comment">//typename scope_tag&lt;Mutex&gt;::type == multi_threaded_tag
+</span><span class="keyword">private</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">Mutex</span> <span class="identifier">lockable_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">multi_threaded_tag</span> <span class="identifier">scope_tag_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">unique_locker</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">,</span><span class="identifier">multi_threaded_tag</span><span class="special">&gt;</span> <span class="identifier">base_type</span><span class="special">;</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="identifier">try_unique_locker</span><span class="special">();</span>
+
+ <span class="keyword">explicit</span> <span class="identifier">try_unique_locker</span><span class="special">(</span><span class="identifier">Mutex</span><span class="special">&amp;</span> <span class="identifier">m_</span><span class="special">);</span>
+ <span class="identifier">try_unique_locker</span><span class="special">(</span><span class="identifier">Mutex</span><span class="special">&amp;</span> <span class="identifier">m_</span><span class="special">,</span><span class="identifier">force_lock_t</span><span class="special">);</span>
+ <span class="identifier">try_unique_locker</span><span class="special">(</span><span class="identifier">Mutex</span><span class="special">&amp;</span> <span class="identifier">m_</span><span class="special">,</span><span class="identifier">adopt_lock_t</span><span class="special">);</span>
+ <span class="identifier">try_unique_locker</span><span class="special">(</span><span class="identifier">Mutex</span><span class="special">&amp;</span> <span class="identifier">m_</span><span class="special">,</span><span class="identifier">defer_lock_t</span><span class="special">);</span>
+ <span class="identifier">try_unique_locker</span><span class="special">(</span><span class="identifier">Mutex</span><span class="special">&amp;</span> <span class="identifier">m_</span><span class="special">,</span><span class="identifier">try_to_lock_t</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">TimeDuration</span><span class="special">&gt;</span>
+ <span class="identifier">try_unique_locker</span><span class="special">(</span><span class="identifier">Mutex</span><span class="special">&amp;</span> <span class="identifier">m_</span><span class="special">,</span><span class="identifier">TimeDuration</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">target_time</span><span class="special">);</span>
+ <span class="identifier">try_unique_locker</span><span class="special">(</span><span class="identifier">Mutex</span><span class="special">&amp;</span> <span class="identifier">m_</span><span class="special">,</span><span class="identifier">system_time</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">target_time</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">TimeDuration</span><span class="special">&gt;</span>
+ <span class="identifier">try_unique_locker</span><span class="special">(</span><span class="identifier">Mutex</span><span class="special">&amp;</span> <span class="identifier">m_</span><span class="special">,</span><span class="identifier">TimeDuration</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">target_time</span><span class="special">,</span> <span class="identifier">throw_lock_t</span><span class="special">);</span>
+ <span class="identifier">try_unique_locker</span><span class="special">(</span><span class="identifier">Mutex</span><span class="special">&amp;</span> <span class="identifier">m_</span><span class="special">,</span><span class="identifier">system_time</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">target_time</span><span class="special">,</span> <span class="identifier">throw_lock_t</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">TimeDuration</span><span class="special">&gt;</span>
+ <span class="identifier">try_unique_locker</span><span class="special">(</span><span class="identifier">TimeDuration</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">target_time</span><span class="special">,</span> <span class="identifier">Mutex</span><span class="special">&amp;</span> <span class="identifier">m_</span><span class="special">);</span>
+ <span class="identifier">try_unique_locker</span><span class="special">(</span><span class="identifier">system_time</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">target_time</span><span class="special">,</span> <span class="identifier">Mutex</span><span class="special">&amp;</span> <span class="identifier">m_</span><span class="special">);</span>
+
+<span class="preprocessor">#ifdef</span> <span class="identifier">BOOST_HAS_RVALUE_REFS</span>
+ <span class="identifier">try_unique_locker</span><span class="special">(</span><span class="identifier">try_unique_locker</span><span class="special">&amp;&amp;</span> <span class="identifier">other</span><span class="special">);</span>
+ <span class="keyword">explicit</span> <span class="identifier">try_unique_locker</span><span class="special">(</span><span class="identifier">upgrade_locker</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">,</span><span class="identifier">scope_tag_type</span><span class="special">&gt;&amp;&amp;</span> <span class="identifier">other</span><span class="special">);</span>
+
+ <span class="identifier">try_unique_locker</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">,</span> <span class="identifier">scope_tag_type</span><span class="special">&gt;&amp;&amp;</span> <span class="identifier">move</span><span class="special">();</span>
+ <span class="identifier">try_unique_locker</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span><span class="identifier">try_unique_locker</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">,</span> <span class="identifier">scope_tag_type</span><span class="special">&gt;&amp;&amp;</span> <span class="identifier">other</span><span class="special">);</span>
+ <span class="identifier">try_unique_locker</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span><span class="identifier">upgrade_locker</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">,</span> <span class="identifier">multi_threaded_tag</span><span class="special">&gt;&amp;&amp;</span> <span class="identifier">other</span><span class="special">);</span>
+ <span class="keyword">void</span> <span class="identifier">swap</span><span class="special">(</span><span class="identifier">try_unique_locker</span><span class="special">&amp;&amp;</span> <span class="identifier">other</span><span class="special">);</span>
+<span class="preprocessor">#else</span>
+ <span class="identifier">try_unique_locker</span><span class="special">(</span><span class="identifier">detail</span><span class="special">::</span><span class="identifier">thread_move_t</span><span class="special">&lt;</span><span class="identifier">try_unique_locker</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">,</span> <span class="identifier">scope_tag_type</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">other</span><span class="special">);</span>
+ <span class="identifier">try_unique_locker</span><span class="special">(</span><span class="identifier">detail</span><span class="special">::</span><span class="identifier">thread_move_t</span><span class="special">&lt;</span><span class="identifier">upgrade_locker</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">,</span><span class="identifier">scope_tag_type</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">other</span><span class="special">);</span>
+
+ <span class="keyword">operator</span> <span class="identifier">detail</span><span class="special">::</span><span class="identifier">thread_move_t</span><span class="special">&lt;</span><span class="identifier">try_unique_locker</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">,</span> <span class="identifier">scope_tag_type</span><span class="special">&gt;</span> <span class="special">&gt;();</span>
+ <span class="identifier">detail</span><span class="special">::</span><span class="identifier">thread_move_t</span><span class="special">&lt;</span><span class="identifier">try_unique_locker</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">,</span> <span class="identifier">scope_tag_type</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">move</span><span class="special">();</span>
+
+ <span class="identifier">try_unique_locker</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span><span class="identifier">detail</span><span class="special">::</span><span class="identifier">thread_move_t</span><span class="special">&lt;</span><span class="identifier">try_unique_locker</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">,</span> <span class="identifier">scope_tag_type</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">other</span><span class="special">);</span>
+ <span class="identifier">try_unique_locker</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span><span class="identifier">detail</span><span class="special">::</span><span class="identifier">thread_move_t</span><span class="special">&lt;</span><span class="identifier">upgrade_locker</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">,</span> <span class="identifier">scope_tag_type</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">other</span><span class="special">);</span>
+
+ <span class="keyword">void</span> <span class="identifier">swap</span><span class="special">(</span><span class="identifier">try_unique_locker</span><span class="special">&amp;</span> <span class="identifier">other</span><span class="special">);</span>
+ <span class="keyword">void</span> <span class="identifier">swap</span><span class="special">(</span><span class="identifier">detail</span><span class="special">::</span><span class="identifier">thread_move_t</span><span class="special">&lt;</span><span class="identifier">try_unique_locker</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">,</span> <span class="identifier">scope_tag_type</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">other</span><span class="special">);</span>
+<span class="preprocessor">#endif</span>
+
+ <span class="special">~</span><span class="identifier">try_unique_locker</span><span class="special">()</span> <span class="special">{}</span>
+<span class="special">};</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.multi_threaded.thread_locks_hpp.template_class__shared_locker___"></a><a href="multi_threaded.html#boost_synchro.reference.multi_threaded.thread_locks_hpp.template_class__shared_locker___" title="Template
+ Class shared_locker&lt;&gt;">Template
+ Class <code class="computeroutput"><span class="identifier">shared_locker</span><span class="special">&lt;&gt;</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Mutex</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">shared_locker</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">,</span><span class="identifier">multi_threaded_tag</span><span class="special">&gt;:</span> <span class="keyword">public</span> <span class="identifier">shared_lock_type</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="special">{</span>
+ <span class="comment">//typename scope_tag&lt;Mutex&gt;::type == multi_threaded_tag
+</span><span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">Mutex</span> <span class="identifier">lockable_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">multi_threaded_tag</span> <span class="identifier">scope_tag_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">shared_lock_type</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">base_type</span><span class="special">;</span>
+
+ <span class="identifier">shared_locker</span><span class="special">();</span>
+ <span class="identifier">BOOST_NON_CONST_COPY_CONSTRUCTOR_DELETE</span><span class="special">(</span><span class="identifier">shared_locker</span><span class="special">)</span> <span class="comment">/*&lt; disable copy construction &gt;*/</span>
+ <span class="identifier">BOOST_NON_CONST_COPY_ASSIGNEMENT_DELETE</span><span class="special">(</span><span class="identifier">shared_locker</span><span class="special">)</span> <span class="comment">/*&lt; disable copy asignement &gt;*/</span>
+
+ <span class="keyword">explicit</span> <span class="identifier">shared_locker</span><span class="special">(</span><span class="identifier">Mutex</span><span class="special">&amp;</span> <span class="identifier">m_</span><span class="special">)</span>
+ <span class="identifier">shared_locker</span><span class="special">(</span><span class="identifier">Mutex</span><span class="special">&amp;</span> <span class="identifier">m_</span><span class="special">,</span><span class="identifier">adopt_lock_t</span><span class="special">);</span>
+ <span class="identifier">shared_locker</span><span class="special">(</span><span class="identifier">Mutex</span><span class="special">&amp;</span> <span class="identifier">m_</span><span class="special">,</span><span class="identifier">defer_lock_t</span><span class="special">);</span>
+ <span class="identifier">shared_locker</span><span class="special">(</span><span class="identifier">Mutex</span><span class="special">&amp;</span> <span class="identifier">m_</span><span class="special">,</span><span class="identifier">try_to_lock_t</span><span class="special">);</span>
+ <span class="identifier">shared_locker</span><span class="special">(</span><span class="identifier">Mutex</span><span class="special">&amp;</span> <span class="identifier">m_</span><span class="special">,</span><span class="identifier">system_time</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">target_time</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">TimeDuration</span><span class="special">&gt;</span>
+ <span class="identifier">shared_locker</span><span class="special">(</span><span class="identifier">Mutex</span><span class="special">&amp;</span> <span class="identifier">m_</span><span class="special">,</span><span class="identifier">TimeDuration</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">target_time</span><span class="special">);</span>
+ <span class="identifier">shared_locker</span><span class="special">(</span><span class="identifier">Mutex</span><span class="special">&amp;</span> <span class="identifier">m_</span><span class="special">,</span><span class="identifier">system_time</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">target_time</span><span class="special">,</span><span class="identifier">throw_lock_t</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">TimeDuration</span><span class="special">&gt;</span>
+ <span class="identifier">shared_locker</span><span class="special">(</span><span class="identifier">Mutex</span><span class="special">&amp;</span> <span class="identifier">m_</span><span class="special">,</span><span class="identifier">TimeDuration</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">target_time</span><span class="special">,</span><span class="identifier">throw_lock_t</span><span class="special">);</span>
+ <span class="identifier">shared_locker</span><span class="special">(</span><span class="identifier">Mutex</span><span class="special">&amp;</span> <span class="identifier">m_</span><span class="special">,</span><span class="identifier">system_time</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">target_time</span><span class="special">,</span><span class="identifier">throw_lock_t</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">TimeDuration</span><span class="special">&gt;</span>
+ <span class="identifier">shared_locker</span><span class="special">(</span><span class="identifier">TimeDuration</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">target_time</span><span class="special">,</span> <span class="identifier">Mutex</span><span class="special">&amp;</span> <span class="identifier">m_</span><span class="special">);</span>
+ <span class="identifier">shared_locker</span><span class="special">(</span><span class="identifier">system_time</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">target_time</span><span class="special">,</span> <span class="identifier">Mutex</span><span class="special">&amp;</span> <span class="identifier">m_</span><span class="special">);</span>
+
+ <span class="identifier">shared_locker</span><span class="special">(</span><span class="identifier">detail</span><span class="special">::</span><span class="identifier">thread_move_t</span><span class="special">&lt;</span><span class="identifier">shared_locker</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">,</span> <span class="identifier">scope_tag_type</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">other</span><span class="special">);</span>
+ <span class="identifier">shared_locker</span><span class="special">(</span><span class="identifier">detail</span><span class="special">::</span><span class="identifier">thread_move_t</span><span class="special">&lt;</span><span class="identifier">unique_locker</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">,</span> <span class="identifier">scope_tag_type</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">other</span><span class="special">);</span>
+ <span class="identifier">shared_locker</span><span class="special">(</span><span class="identifier">detail</span><span class="special">::</span><span class="identifier">thread_move_t</span><span class="special">&lt;</span><span class="identifier">upgrade_locker</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">,</span> <span class="identifier">scope_tag_type</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">other</span><span class="special">);</span>
+
+ <span class="keyword">operator</span> <span class="identifier">detail</span><span class="special">::</span><span class="identifier">thread_move_t</span><span class="special">&lt;</span><span class="identifier">shared_locker</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">,</span><span class="identifier">scope_tag_type</span><span class="special">&gt;</span> <span class="special">&gt;();</span>
+ <span class="identifier">detail</span><span class="special">::</span><span class="identifier">thread_move_t</span><span class="special">&lt;</span><span class="identifier">shared_locker</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">,</span> <span class="identifier">scope_tag_type</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">move</span><span class="special">();</span>
+
+ <span class="identifier">shared_locker</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span><span class="identifier">detail</span><span class="special">::</span><span class="identifier">thread_move_t</span><span class="special">&lt;</span><span class="identifier">shared_locker</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">,</span> <span class="identifier">scope_tag_type</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">other</span><span class="special">);</span>
+ <span class="identifier">shared_locker</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span><span class="identifier">detail</span><span class="special">::</span><span class="identifier">thread_move_t</span><span class="special">&lt;</span><span class="identifier">unique_locker</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">,</span> <span class="identifier">scope_tag_type</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">other</span><span class="special">);</span>
+ <span class="identifier">shared_locker</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span><span class="identifier">detail</span><span class="special">::</span><span class="identifier">thread_move_t</span><span class="special">&lt;</span><span class="identifier">upgrade_locker</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">,</span> <span class="identifier">scope_tag_type</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">other</span><span class="special">);</span>
+
+<span class="preprocessor">#ifdef</span> <span class="identifier">BOOST_HAS_RVALUE_REFS</span>
+ <span class="keyword">void</span> <span class="identifier">swap</span><span class="special">(</span><span class="identifier">shared_locker</span><span class="special">&amp;&amp;</span> <span class="identifier">other</span><span class="special">);</span>
+<span class="preprocessor">#else</span>
+ <span class="keyword">void</span> <span class="identifier">swap</span><span class="special">(</span><span class="identifier">shared_locker</span><span class="special">&amp;</span> <span class="identifier">other</span><span class="special">);</span>
+ <span class="keyword">void</span> <span class="identifier">swap</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">detail</span><span class="special">::</span><span class="identifier">thread_move_t</span><span class="special">&lt;</span><span class="identifier">shared_locker</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">,</span> <span class="identifier">scope_tag_type</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">other</span><span class="special">);</span>
+<span class="preprocessor">#endif</span>
+
+ <span class="identifier">Mutex</span><span class="special">*</span> <span class="identifier">mutex</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="keyword">bool</span> <span class="identifier">is_locking</span><span class="special">(</span><span class="identifier">lockable_type</span><span class="special">*</span> <span class="identifier">l</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="keyword">bool</span> <span class="identifier">try_lock_until</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">system_time</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">absolute_time</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Duration</span><span class="special">&gt;</span>
+ <span class="keyword">bool</span> <span class="identifier">try_lock_for</span><span class="special">(</span><span class="identifier">Duration</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">relative_time</span><span class="special">);</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">TimeDuration</span><span class="special">&gt;</span>
+ <span class="keyword">void</span> <span class="identifier">lock_for</span><span class="special">(</span><span class="identifier">TimeDuration</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">relative_time</span><span class="special">);</span>
+ <span class="keyword">void</span> <span class="identifier">lock_until</span><span class="special">(::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">system_time</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">absolute_time</span><span class="special">);</span>
+<span class="special">};</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.multi_threaded.thread_locks_hpp.template_class__upgrade_locker___"></a><a href="multi_threaded.html#boost_synchro.reference.multi_threaded.thread_locks_hpp.template_class__upgrade_locker___" title="Template
+ Class upgrade_locker&lt;&gt;">Template
+ Class <code class="computeroutput"><span class="identifier">upgrade_locker</span><span class="special">&lt;&gt;</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Mutex</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">upgrade_locker</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">,</span><span class="identifier">multi_threaded_tag</span><span class="special">&gt;:</span> <span class="keyword">public</span> <span class="identifier">upgrade_lock_type</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="special">{</span>
+ <span class="comment">//typename scope_tag&lt;Mutex&gt;::type == multi_threaded_tag
+</span><span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">Mutex</span> <span class="identifier">lockable_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">multi_threaded_tag</span> <span class="identifier">scope_tag_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">upgrade_lock_type</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">base_type</span><span class="special">;</span>
+
+ <span class="identifier">upgrade_locker</span><span class="special">();</span>
+ <span class="identifier">BOOST_NON_CONST_COPY_CONSTRUCTOR_DELETE</span><span class="special">(</span><span class="identifier">upgrade_locker</span><span class="special">)</span> <span class="comment">/*&lt; disable copy construction &gt;*/</span>
+ <span class="identifier">BOOST_NON_CONST_COPY_ASSIGNEMENT_DELETE</span><span class="special">(</span><span class="identifier">upgrade_locker</span><span class="special">)</span> <span class="comment">/*&lt; disable copy asignement &gt;*/</span>
+
+ <span class="keyword">explicit</span> <span class="identifier">upgrade_locker</span><span class="special">(</span><span class="identifier">Mutex</span><span class="special">&amp;</span> <span class="identifier">m_</span><span class="special">);</span>
+ <span class="identifier">upgrade_locker</span><span class="special">(</span><span class="identifier">Mutex</span><span class="special">&amp;</span> <span class="identifier">m_</span><span class="special">,</span><span class="identifier">adopt_lock_t</span><span class="special">);</span>
+ <span class="identifier">upgrade_locker</span><span class="special">(</span><span class="identifier">Mutex</span><span class="special">&amp;</span> <span class="identifier">m_</span><span class="special">,</span><span class="identifier">defer_lock_t</span><span class="special">);</span>
+ <span class="identifier">upgrade_locker</span><span class="special">(</span><span class="identifier">Mutex</span><span class="special">&amp;</span> <span class="identifier">m_</span><span class="special">,</span><span class="identifier">try_to_lock_t</span><span class="special">);</span>
+
+ <span class="identifier">upgrade_locker</span><span class="special">(</span><span class="identifier">detail</span><span class="special">::</span><span class="identifier">thread_move_t</span><span class="special">&lt;</span><span class="identifier">upgrade_locker</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">,</span> <span class="identifier">scope_tag_type</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">other</span><span class="special">);</span>
+ <span class="identifier">upgrade_locker</span><span class="special">(</span><span class="identifier">detail</span><span class="special">::</span><span class="identifier">thread_move_t</span><span class="special">&lt;</span><span class="identifier">unique_locker</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">,</span> <span class="identifier">scope_tag_type</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">other</span><span class="special">);</span>
+
+ <span class="keyword">operator</span> <span class="identifier">detail</span><span class="special">::</span><span class="identifier">thread_move_t</span><span class="special">&lt;</span><span class="identifier">upgrade_locker</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">,</span> <span class="identifier">scope_tag_type</span><span class="special">&gt;</span> <span class="special">&gt;();</span>
+ <span class="identifier">detail</span><span class="special">::</span><span class="identifier">thread_move_t</span><span class="special">&lt;</span><span class="identifier">upgrade_locker</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">,</span> <span class="identifier">scope_tag_type</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">move</span><span class="special">();</span>
+
+ <span class="identifier">upgrade_locker</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span><span class="identifier">detail</span><span class="special">::</span><span class="identifier">thread_move_t</span><span class="special">&lt;</span><span class="identifier">upgrade_locker</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">,</span> <span class="identifier">scope_tag_type</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">other</span><span class="special">);</span>
+ <span class="identifier">upgrade_locker</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span><span class="identifier">detail</span><span class="special">::</span><span class="identifier">thread_move_t</span><span class="special">&lt;</span><span class="identifier">unique_locker</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">,</span> <span class="identifier">scope_tag_type</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">other</span><span class="special">);</span>
+
+ <span class="keyword">void</span> <span class="identifier">swap</span><span class="special">(</span><span class="identifier">upgrade_locker</span><span class="special">&amp;</span> <span class="identifier">other</span><span class="special">);</span>
+
+ <span class="special">~</span><span class="identifier">upgrade_locker</span><span class="special">();</span>
+ <span class="identifier">Mutex</span><span class="special">*</span> <span class="identifier">mutex</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+
+ <span class="keyword">bool</span> <span class="identifier">is_locking</span><span class="special">(</span><span class="identifier">lockable_type</span><span class="special">*</span> <span class="identifier">l</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.multi_threaded.thread_locks_hpp.template_class__upgrade_to_unique_locker___"></a><a href="multi_threaded.html#boost_synchro.reference.multi_threaded.thread_locks_hpp.template_class__upgrade_to_unique_locker___" title="Template
+ Class upgrade_to_unique_locker&lt;&gt;">Template
+ Class <code class="computeroutput"><span class="identifier">upgrade_to_unique_locker</span><span class="special">&lt;&gt;</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Mutex</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">upgrade_to_unique_locker</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">,</span><span class="identifier">multi_threaded_tag</span><span class="special">&gt;:</span> <span class="keyword">public</span> <span class="identifier">upgrade_to_unique_locker_type</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="special">{</span>
+ <span class="comment">//typename scope_tag&lt;Mutex&gt;::type == multi_threaded_tag
+</span><span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">Mutex</span> <span class="identifier">lockable_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">multi_threaded_tag</span> <span class="identifier">scope_tag_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">upgrade_to_unique_locker_type</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">base_type</span><span class="special">;</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="identifier">BOOST_NON_CONST_COPY_CONSTRUCTOR_DELETE</span><span class="special">(</span><span class="identifier">upgrade_locker</span><span class="special">)</span> <span class="comment">/*&lt; disable copy construction &gt;*/</span>
+ <span class="identifier">BOOST_NON_CONST_COPY_ASSIGNEMENT_DELETE</span><span class="special">(</span><span class="identifier">upgrade_locker</span><span class="special">)</span> <span class="comment">/*&lt; disable copy asignement &gt;*/</span>
+
+ <span class="keyword">explicit</span> <span class="identifier">upgrade_to_unique_locker</span><span class="special">(</span><span class="identifier">upgrade_locker</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">,</span><span class="identifier">multi_threaded_tag</span><span class="special">&gt;&amp;</span> <span class="identifier">m_</span><span class="special">);</span>
+ <span class="special">~</span><span class="identifier">upgrade_to_unique_locker</span><span class="special">();</span>
+
+ <span class="identifier">upgrade_to_unique_locker</span><span class="special">(</span><span class="identifier">detail</span><span class="special">::</span><span class="identifier">thread_move_t</span><span class="special">&lt;</span><span class="identifier">upgrade_to_unique_locker</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">,</span> <span class="identifier">scope_tag_type</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">other</span><span class="special">);</span>
+
+ <span class="identifier">upgrade_to_unique_locker</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span><span class="identifier">detail</span><span class="special">::</span><span class="identifier">thread_move_t</span><span class="special">&lt;</span><span class="identifier">upgrade_to_unique_locker</span><span class="special">&lt;</span><span class="identifier">Mutex</span><span class="special">,</span> <span class="identifier">scope_tag_type</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">other</span><span class="special">);</span>
+ <span class="keyword">void</span> <span class="identifier">swap</span><span class="special">(</span><span class="identifier">upgrade_to_unique_locker</span><span class="special">&amp;</span> <span class="identifier">other</span><span class="special">);</span>
+
+ <span class="identifier">Mutex</span><span class="special">*</span> <span class="identifier">mutex</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="keyword">bool</span> <span class="identifier">is_locking</span><span class="special">(</span><span class="identifier">lockable_type</span><span class="special">*</span> <span class="identifier">l</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+</div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.multi_threaded.thread_synchronization_family_hpp"></a><a href="multi_threaded.html#boost_synchro.reference.multi_threaded.thread_synchronization_family_hpp" title="
+ Header &lt;boost/synchro/thread_synchronization_family.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">thread_synchronization_family</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl><dt><span class="section"><a href="multi_threaded.html#boost_synchro.reference.multi_threaded.thread_synchronization_family_hpp.class__thread_synchronization_family_">Class
+ <code class="computeroutput"><span class="identifier">thread_synchronization_family</span></code></a></span></dt></dl></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.multi_threaded.thread_synchronization_family_hpp.class__thread_synchronization_family_"></a><a href="multi_threaded.html#boost_synchro.reference.multi_threaded.thread_synchronization_family_hpp.class__thread_synchronization_family_" title="Class
+ thread_synchronization_family">Class
+ <code class="computeroutput"><span class="identifier">thread_synchronization_family</span></code></a>
+</h5></div></div></div>
+<p>
+ <span class="bold"><strong>Synopsis</strong></span>
+ </p>
+<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">thread_synchronization_family</span>
+<span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">thread_mutex</span> <span class="identifier">mutex_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">thread_recursive_mutex</span> <span class="identifier">recursive_mutex_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">thread_timed_mutex</span> <span class="identifier">timed_mutex_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">thread_recursive_timed_mutex</span> <span class="identifier">recursive_timed_mutex_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">thread_shared_mutex</span> <span class="identifier">shared_mutex_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">condition_variable</span> <span class="identifier">condition_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">condition_variable_any</span> <span class="identifier">condition_type_any</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+</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"><div class="copyright-footer">Copyright © 2008 Vicente J. Botet Escriba<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="single_threaded.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="multi_process.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/synchro/libs/synchro/doc/html/boost_synchro/reference/other.html
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/html/boost_synchro/reference/other.html 2009-10-12 17:49:35 EDT (Mon, 12 Oct 2009)
@@ -0,0 +1,74 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Other</title>
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+<link rel="start" href="../../index.html" title="Chapter 1. Boost.Synchro">
+<link rel="up" href="../reference.html" title="Reference">
+<link rel="prev" href="polymorphic_locks.html" title="Polymorphic
+ Locks">
+<link rel="next" href="high_level.html" title="High Level">
+</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">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="polymorphic_locks.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="high_level.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_synchro.reference.other"></a>Other
+</h3></div></div></div>
+<div class="toc"><dl><dt><span class="section"><a href="other.html#boost_synchro.reference.other.semaphore_hpp"> Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">semaphore</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt></dl></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.other.semaphore_hpp"></a><a href="other.html#boost_synchro.reference.other.semaphore_hpp" title=" Header
+ &lt;boost/synchro/semaphore.hpp&gt;"> Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">semaphore</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">synchro</span> <span class="special">{</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Sync</span><span class="special">=</span><span class="identifier">thread_synchronization_family</span><span class="special">&gt;</span>
+ <span class="keyword">class</span> <span class="identifier">basic_semaphore</span> <span class="special">{</span>
+ <span class="identifier">basic_semaphore</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">basic_semaphore</span> <span class="special">&amp;);</span>
+ <span class="identifier">this_type</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <span class="identifier">basic_semaphore</span> <span class="special">&amp;);</span>
+ <span class="keyword">public</span><span class="special">:</span>
+ <span class="identifier">basic_semaphore</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">initialCount</span><span class="special">);</span>
+ <span class="special">~</span><span class="identifier">basic_semaphore</span><span class="special">();</span>
+ <span class="keyword">void</span> <span class="identifier">post</span><span class="special">();</span>
+ <span class="keyword">void</span> <span class="identifier">wait</span><span class="special">();</span>
+ <span class="keyword">bool</span> <span class="identifier">try_wait</span><span class="special">();</span>
+ <span class="keyword">bool</span> <span class="identifier">wait_until</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">system_time</span> <span class="special">&amp;</span><span class="identifier">abs_time</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">TimeDuration</span><span class="special">&gt;</span>
+ <span class="keyword">bool</span> <span class="identifier">wait_for</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">TimeDuration</span> <span class="special">&amp;</span><span class="identifier">rel_time</span><span class="special">);</span>
+ <span class="special">};</span>
+
+ <span class="keyword">typedef</span> <span class="identifier">basic_semaphore</span><span class="special">&lt;&gt;</span> <span class="identifier">semaphore</span><span class="special">;</span>
+
+<span class="special">}}</span>
+</pre>
+</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">Copyright © 2008 Vicente J. Botet Escriba<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="polymorphic_locks.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="high_level.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/synchro/libs/synchro/doc/html/boost_synchro/reference/polymorphic_locks.html
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/html/boost_synchro/reference/polymorphic_locks.html 2009-10-12 17:49:35 EDT (Mon, 12 Oct 2009)
@@ -0,0 +1,283 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Polymorphic
+ Locks</title>
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+<link rel="start" href="../../index.html" title="Chapter 1. Boost.Synchro">
+<link rel="up" href="../reference.html" title="Reference">
+<link rel="prev" href="multi_process.html" title="Multi-process">
+<link rel="next" href="other.html" title="Other">
+</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">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="multi_process.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="other.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_synchro.reference.polymorphic_locks"></a><a href="polymorphic_locks.html" title="Polymorphic
+ Locks">Polymorphic
+ Locks</a>
+</h3></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="polymorphic_locks.html#boost_synchro.reference.polymorphic_locks.poly_lock_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">poly</span><span class="special">/</span><span class="identifier">lock</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="polymorphic_locks.html#boost_synchro.reference.polymorphic_locks.poly_lock_hpp.abstract_class__exclusive_lock_">Abstract
+ Class <code class="computeroutput"><span class="identifier">exclusive_lock</span></code></a></span></dt>
+<dt><span class="section"><a href="polymorphic_locks.html#boost_synchro.reference.polymorphic_locks.poly_lock_hpp.abstract_class__timed_lock_">Abstract
+ Class <code class="computeroutput"><span class="identifier">timed_lock</span></code></a></span></dt>
+<dt><span class="section"><a href="polymorphic_locks.html#boost_synchro.reference.polymorphic_locks.poly_lock_hpp.abstract_class__sharable_lock_">Abstract
+ Class <code class="computeroutput"><span class="identifier">sharable_lock</span></code></a></span></dt>
+<dt><span class="section"><a href="polymorphic_locks.html#boost_synchro.reference.polymorphic_locks.poly_lock_hpp.abstract_class__upgradable_lock_">Abstract
+ Class <code class="computeroutput"><span class="identifier">upgradable_lock</span></code></a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="polymorphic_locks.html#boost_synchro.reference.polymorphic_locks.poly_lock_adpater_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">poly</span><span class="special">/</span><span class="identifier">lock_adpater</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="polymorphic_locks.html#boost_synchro.reference.polymorphic_locks.poly_lock_adpater_hpp.template_class__exclusive_lock_adapter_">Template
+ Class <code class="computeroutput"><span class="identifier">exclusive_lock_adapter</span></code></a></span></dt>
+<dt><span class="section"><a href="polymorphic_locks.html#boost_synchro.reference.polymorphic_locks.poly_lock_adpater_hpp.template_class__timed_lock_adapter_">Template
+ Class <code class="computeroutput"><span class="identifier">timed_lock_adapter</span></code></a></span></dt>
+<dt><span class="section"><a href="polymorphic_locks.html#boost_synchro.reference.polymorphic_locks.poly_lock_adpater_hpp.template_class__sharable_lock_adapter_">Template
+ Class <code class="computeroutput"><span class="identifier">sharable_lock_adapter</span></code></a></span></dt>
+<dt><span class="section"><a href="polymorphic_locks.html#boost_synchro.reference.polymorphic_locks.poly_lock_adpater_hpp.template_class__upgradable_lock_">Template
+ Class <code class="computeroutput"><span class="identifier">upgradable_lock</span></code></a></span></dt>
+</dl></dd>
+</dl></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.polymorphic_locks.poly_lock_hpp"></a><a href="polymorphic_locks.html#boost_synchro.reference.polymorphic_locks.poly_lock_hpp" title="
+ Header &lt;boost/synchro/poly/lock.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">poly</span><span class="special">/</span><span class="identifier">lock</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="polymorphic_locks.html#boost_synchro.reference.polymorphic_locks.poly_lock_hpp.abstract_class__exclusive_lock_">Abstract
+ Class <code class="computeroutput"><span class="identifier">exclusive_lock</span></code></a></span></dt>
+<dt><span class="section"><a href="polymorphic_locks.html#boost_synchro.reference.polymorphic_locks.poly_lock_hpp.abstract_class__timed_lock_">Abstract
+ Class <code class="computeroutput"><span class="identifier">timed_lock</span></code></a></span></dt>
+<dt><span class="section"><a href="polymorphic_locks.html#boost_synchro.reference.polymorphic_locks.poly_lock_hpp.abstract_class__sharable_lock_">Abstract
+ Class <code class="computeroutput"><span class="identifier">sharable_lock</span></code></a></span></dt>
+<dt><span class="section"><a href="polymorphic_locks.html#boost_synchro.reference.polymorphic_locks.poly_lock_hpp.abstract_class__upgradable_lock_">Abstract
+ Class <code class="computeroutput"><span class="identifier">upgradable_lock</span></code></a></span></dt>
+</dl></div>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">synchro</span> <span class="special">{</span>
+ <span class="keyword">namespace</span> <span class="identifier">poly</span> <span class="special">{</span>
+ <span class="keyword">struct</span> <span class="identifier">exclusive_lock</span><span class="special">;</span>
+ <span class="keyword">struct</span> <span class="identifier">timed_lock</span><span class="special">;</span>
+ <span class="keyword">struct</span> <span class="identifier">sharable_lock</span><span class="special">;</span>
+ <span class="keyword">struct</span> <span class="identifier">upgradable_lock</span><span class="special">;</span>
+ <span class="special">}</span>
+<span class="special">}}</span>
+</pre>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.polymorphic_locks.poly_lock_hpp.abstract_class__exclusive_lock_"></a><a href="polymorphic_locks.html#boost_synchro.reference.polymorphic_locks.poly_lock_hpp.abstract_class__exclusive_lock_" title="Abstract
+ Class exclusive_lock">Abstract
+ Class <code class="computeroutput"><span class="identifier">exclusive_lock</span></code></a>
+</h5></div></div></div>
+<p>
+ Polymorphic exclusive lock interface.
+ </p>
+<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">exclusive_lock</span> <span class="special">{</span>
+ <span class="keyword">virtual</span> <span class="special">~</span><span class="identifier">exclusive_lock</span><span class="special">()=</span><span class="number">0</span><span class="special">;</span>
+ <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">lock</span><span class="special">()=</span><span class="number">0</span><span class="special">;</span>
+ <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">unlock</span><span class="special">()=</span><span class="number">0</span><span class="special">;</span>
+ <span class="keyword">virtual</span> <span class="keyword">bool</span> <span class="identifier">try_lock</span><span class="special">()=</span><span class="number">0</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.polymorphic_locks.poly_lock_hpp.abstract_class__timed_lock_"></a><a href="polymorphic_locks.html#boost_synchro.reference.polymorphic_locks.poly_lock_hpp.abstract_class__timed_lock_" title="Abstract
+ Class timed_lock">Abstract
+ Class <code class="computeroutput"><span class="identifier">timed_lock</span></code></a>
+</h5></div></div></div>
+<p>
+ Polymorphic timed lock interface.
+ </p>
+<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">timed_lock</span> <span class="special">:</span> <span class="identifier">exclusive_lock</span> <span class="special">{</span>
+ <span class="keyword">virtual</span> <span class="special">~</span><span class="identifier">timed_lock</span><span class="special">()=</span><span class="number">0</span><span class="special">;</span>
+ <span class="keyword">bool</span> <span class="identifier">try_lock_until</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">system_time</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">abs_time</span><span class="special">)=</span><span class="number">0</span><span class="special">;</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">DurationType</span><span class="special">&gt;</span>
+ <span class="keyword">bool</span> <span class="identifier">try_lock_for</span><span class="special">(</span><span class="identifier">DurationType</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">rel_time</span><span class="special">)</span>
+ <span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">try_lock_until</span><span class="special">(</span><span class="identifier">get_system_time</span><span class="special">()+</span><span class="identifier">abs_time</span><span class="special">);</span>
+ <span class="special">}</span>
+<span class="special">};</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.polymorphic_locks.poly_lock_hpp.abstract_class__sharable_lock_"></a><a href="polymorphic_locks.html#boost_synchro.reference.polymorphic_locks.poly_lock_hpp.abstract_class__sharable_lock_" title="Abstract
+ Class sharable_lock">Abstract
+ Class <code class="computeroutput"><span class="identifier">sharable_lock</span></code></a>
+</h5></div></div></div>
+<p>
+ Polymorphic sharable lock interface.
+ </p>
+<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">sharable_lock</span> <span class="special">:</span> <span class="identifier">timed_lock</span> <span class="special">{</span>
+ <span class="keyword">virtual</span> <span class="special">~</span><span class="identifier">sharable_lock</span><span class="special">();</span>
+ <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">lock_shared</span><span class="special">()=</span><span class="number">0</span><span class="special">;</span>
+ <span class="keyword">virtual</span> <span class="keyword">bool</span> <span class="identifier">try_lock_shared</span><span class="special">()=</span><span class="number">0</span><span class="special">;</span>
+ <span class="keyword">virtual</span> <span class="keyword">bool</span> <span class="identifier">try_lock_shared_until</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">system_time</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">abs_time</span><span class="special">)=</span><span class="number">0</span><span class="special">;</span>
+ <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">unlock_shared</span><span class="special">()=</span><span class="number">0</span><span class="special">;</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">DurationType</span><span class="special">&gt;</span>
+ <span class="keyword">bool</span> <span class="identifier">try_lock_shared_for</span><span class="special">(</span><span class="identifier">DurationType</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">rel_time</span><span class="special">)</span>
+ <span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">try_lock_shared_until</span><span class="special">(</span><span class="identifier">get_system_time</span><span class="special">()+</span><span class="identifier">abs_time</span><span class="special">);</span>
+ <span class="special">}</span>
+<span class="special">};</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.polymorphic_locks.poly_lock_hpp.abstract_class__upgradable_lock_"></a><a href="polymorphic_locks.html#boost_synchro.reference.polymorphic_locks.poly_lock_hpp.abstract_class__upgradable_lock_" title="Abstract
+ Class upgradable_lock">Abstract
+ Class <code class="computeroutput"><span class="identifier">upgradable_lock</span></code></a>
+</h5></div></div></div>
+<p>
+ Polymorphic upgradable lock interface.
+ </p>
+<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">upgradable_lock</span> <span class="special">:</span> <span class="identifier">sharable_lock</span> <span class="special">{</span>
+ <span class="keyword">virtual</span> <span class="special">~</span><span class="identifier">upgradable_lock</span><span class="special">();</span>
+ <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">lock_upgrade</span><span class="special">()=</span><span class="number">0</span><span class="special">;</span>
+ <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">unlock_upgrade</span><span class="special">()=</span><span class="number">0</span><span class="special">;</span>
+ <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">unlock_upgrade_and_lock</span><span class="special">()=</span><span class="number">0</span><span class="special">;</span>
+ <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">unlock_and_lock_upgrade</span><span class="special">()=</span><span class="number">0</span><span class="special">;</span>
+ <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">unlock_and_lock_shared</span><span class="special">()=</span><span class="number">0</span><span class="special">;</span>
+ <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">unlock_upgrade_and_lock_shared</span><span class="special">()=</span><span class="number">0</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+</div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.polymorphic_locks.poly_lock_adpater_hpp"></a><a href="polymorphic_locks.html#boost_synchro.reference.polymorphic_locks.poly_lock_adpater_hpp" title="
+ Header &lt;boost/synchro/poly/lock_adpater.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">poly</span><span class="special">/</span><span class="identifier">lock_adpater</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="polymorphic_locks.html#boost_synchro.reference.polymorphic_locks.poly_lock_adpater_hpp.template_class__exclusive_lock_adapter_">Template
+ Class <code class="computeroutput"><span class="identifier">exclusive_lock_adapter</span></code></a></span></dt>
+<dt><span class="section"><a href="polymorphic_locks.html#boost_synchro.reference.polymorphic_locks.poly_lock_adpater_hpp.template_class__timed_lock_adapter_">Template
+ Class <code class="computeroutput"><span class="identifier">timed_lock_adapter</span></code></a></span></dt>
+<dt><span class="section"><a href="polymorphic_locks.html#boost_synchro.reference.polymorphic_locks.poly_lock_adpater_hpp.template_class__sharable_lock_adapter_">Template
+ Class <code class="computeroutput"><span class="identifier">sharable_lock_adapter</span></code></a></span></dt>
+<dt><span class="section"><a href="polymorphic_locks.html#boost_synchro.reference.polymorphic_locks.poly_lock_adpater_hpp.template_class__upgradable_lock_">Template
+ Class <code class="computeroutput"><span class="identifier">upgradable_lock</span></code></a></span></dt>
+</dl></div>
+<p>
+ namespace boost { namespace synchro { namespace poly { template &lt;typename
+ Lockable&gt; class exclusive_lock_adapter; template &lt;typename TimeLockable&gt;
+ class timed_lock_adapter; template &lt;typename ShareLockable&gt; class
+ sharable_lock_adapter; template &lt;typename UpgradaLockable&gt; class
+ upgradable_lock_adapter; } }}
+ </p>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.polymorphic_locks.poly_lock_adpater_hpp.template_class__exclusive_lock_adapter_"></a><a href="polymorphic_locks.html#boost_synchro.reference.polymorphic_locks.poly_lock_adpater_hpp.template_class__exclusive_lock_adapter_" title="Template
+ Class exclusive_lock_adapter">Template
+ Class <code class="computeroutput"><span class="identifier">exclusive_lock_adapter</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">exclusive_lock_adapter</span>
+ <span class="special">:</span> <span class="keyword">public</span> <span class="keyword">virtual</span> <span class="identifier">exclusive_lock</span>
+<span class="special">{</span>
+ <span class="identifier">exclusive_lock_adapter</span><span class="special">();</span>
+ <span class="special">~</span><span class="identifier">exclusive_lock_adapter</span><span class="special">();</span>
+ <span class="keyword">void</span> <span class="identifier">lock</span><span class="special">();</span>
+ <span class="keyword">void</span> <span class="identifier">unlock</span><span class="special">();</span>
+ <span class="keyword">bool</span> <span class="identifier">try_lock</span><span class="special">();</span>
+<span class="keyword">protected</span><span class="special">:</span>
+ <span class="identifier">Lockable</span> <span class="identifier">lock_</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.polymorphic_locks.poly_lock_adpater_hpp.template_class__timed_lock_adapter_"></a><a href="polymorphic_locks.html#boost_synchro.reference.polymorphic_locks.poly_lock_adpater_hpp.template_class__timed_lock_adapter_" title="Template
+ Class timed_lock_adapter">Template
+ Class <code class="computeroutput"><span class="identifier">timed_lock_adapter</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">TimeLockable</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">timed_lock_adapter</span>
+ <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">exclusive_lock_adapter</span><span class="special">&lt;</span><span class="identifier">TimeLockable</span><span class="special">&gt;</span>
+ <span class="special">,</span> <span class="keyword">public</span> <span class="keyword">virtual</span> <span class="identifier">timed_lock</span>
+<span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="special">~</span><span class="identifier">timed_lock_adapter</span><span class="special">();</span>
+ <span class="keyword">bool</span> <span class="identifier">try_lock_until</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">system_time</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">abs_time</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">DurationType</span><span class="special">&gt;</span>
+ <span class="keyword">bool</span> <span class="identifier">try_lock_for</span><span class="special">(</span><span class="identifier">DurationType</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">rel_time</span><span class="special">);</span>
+<span class="special">};</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.polymorphic_locks.poly_lock_adpater_hpp.template_class__sharable_lock_adapter_"></a><a href="polymorphic_locks.html#boost_synchro.reference.polymorphic_locks.poly_lock_adpater_hpp.template_class__sharable_lock_adapter_" title="Template
+ Class sharable_lock_adapter">Template
+ Class <code class="computeroutput"><span class="identifier">sharable_lock_adapter</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">ShareLockable</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">sharable_lock_adapter</span>
+ <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">exclusive_lock_adapter</span><span class="special">&lt;</span><span class="identifier">ShareLockable</span><span class="special">&gt;</span>
+ <span class="special">,</span> <span class="keyword">public</span> <span class="keyword">virtual</span> <span class="identifier">sharable_lock</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="special">~</span><span class="identifier">sharable_lock_adapter</span><span class="special">();</span>
+ <span class="keyword">void</span> <span class="identifier">lock_shared</span><span class="special">();</span>
+ <span class="keyword">bool</span> <span class="identifier">try_lock_shared</span><span class="special">();</span>
+ <span class="keyword">void</span> <span class="identifier">unlock_shared</span><span class="special">();</span>
+<span class="special">};</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.polymorphic_locks.poly_lock_adpater_hpp.template_class__upgradable_lock_"></a><a href="polymorphic_locks.html#boost_synchro.reference.polymorphic_locks.poly_lock_adpater_hpp.template_class__upgradable_lock_" title="Template
+ Class upgradable_lock">Template
+ Class <code class="computeroutput"><span class="identifier">upgradable_lock</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">UpgradaLockable</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">upgradable_lock_adapter</span>
+ <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">sharable_lock_adapter</span><span class="special">&lt;</span><span class="identifier">UpgradaLockable</span><span class="special">&gt;</span>
+ <span class="special">,</span> <span class="keyword">public</span> <span class="keyword">virtual</span> <span class="identifier">upgradable_lock</span>
+<span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">virtual</span> <span class="special">~</span><span class="identifier">upgradable_lock_adapter</span><span class="special">();</span>
+ <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">lock_upgrade</span><span class="special">();</span>
+
+ <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">unlock_upgrade</span><span class="special">();</span>
+
+ <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">unlock_upgrade_and_lock</span><span class="special">();</span>
+ <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">unlock_and_lock_upgrade</span><span class="special">();</span>
+ <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">unlock_and_lock_shared</span><span class="special">();</span>
+ <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">unlock_upgrade_and_lock_shared</span><span class="special">();</span>
+<span class="special">};</span>
+</pre>
+</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"><div class="copyright-footer">Copyright © 2008 Vicente J. Botet Escriba<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="multi_process.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="other.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/synchro/libs/synchro/doc/html/boost_synchro/reference/single_threaded.html
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/html/boost_synchro/reference/single_threaded.html 2009-10-12 17:49:35 EDT (Mon, 12 Oct 2009)
@@ -0,0 +1,196 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Single-threaded</title>
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+<link rel="start" href="../../index.html" title="Chapter 1. Boost.Synchro">
+<link rel="up" href="../reference.html" title="Reference">
+<link rel="prev" href="lockers.html" title="Lockers">
+<link rel="next" href="multi_threaded.html" title="Multi-threaded">
+</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">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="lockers.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="multi_threaded.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_synchro.reference.single_threaded"></a>Single-threaded
+</h3></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="single_threaded.html#boost_synchro.reference.single_threaded.null_mutex_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">null_mutex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="single_threaded.html#boost_synchro.reference.single_threaded.null_condition_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">null_condition</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="single_threaded.html#boost_synchro.reference.single_threaded.null_synchronization_family_hpp">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">null_synchronization_family</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dd><dl><dt><span class="section"><a href="single_threaded.html#boost_synchro.reference.single_threaded.null_synchronization_family_hpp.class__null_synchronization_policy_">Class
+ <code class="computeroutput"><span class="identifier">null_synchronization_policy</span></code></a></span></dt></dl></dd>
+</dl></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.single_threaded.null_mutex_hpp"></a><a href="single_threaded.html#boost_synchro.reference.single_threaded.null_mutex_hpp" title="
+ Header &lt;boost/synchro/null_mutex.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">null_mutex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">synchro</span> <span class="special">{</span>
+ <span class="keyword">class</span> <span class="identifier">null_condition</span><span class="special">;</span>
+ <span class="keyword">class</span> <span class="identifier">null_mutex</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">lock_traits_base</span><span class="special">&lt;</span>
+ <span class="identifier">mono_threaded_tag</span><span class="special">,</span>
+ <span class="identifier">upgradable_lock_tag</span><span class="special">,</span>
+ <span class="identifier">recursive_tag</span><span class="special">,</span>
+ <span class="identifier">has_timed_interface_tag</span><span class="special">,</span>
+ <span class="identifier">kernel_lifetime_tag</span><span class="special">,</span>
+ <span class="identifier">anonymous_tag</span><span class="special">,</span>
+ <span class="keyword">void</span>
+ <span class="special">&gt;</span>
+ <span class="special">{</span>
+ <span class="identifier">null_mutex</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">null_mutex</span><span class="special">&amp;);</span>
+ <span class="identifier">null_mutex</span> <span class="special">&amp;</span><span class="keyword">operator</span><span class="special">=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">null_mutex</span><span class="special">&amp;);</span>
+ <span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">null_condition</span> <span class="identifier">condition_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">null_condition</span> <span class="identifier">condition_any_type</span><span class="special">;</span>
+
+ <span class="identifier">null_mutex</span><span class="special">();</span>
+ <span class="special">~</span><span class="identifier">null_mutex</span><span class="special">();</span>
+
+ <span class="keyword">void</span> <span class="identifier">lock</span><span class="special">();</span>
+ <span class="keyword">bool</span> <span class="identifier">try_lock</span><span class="special">();</span>
+ <span class="keyword">bool</span> <span class="identifier">try_lock_until</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">ptime</span> <span class="special">&amp;);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">TimeDuration</span><span class="special">&gt;</span>
+ <span class="keyword">bool</span> <span class="identifier">try_lock_for</span><span class="special">(</span><span class="identifier">TimeDuration</span> <span class="keyword">const</span> <span class="special">&amp;</span> <span class="identifier">relative_time</span><span class="special">);</span>
+
+ <span class="keyword">void</span> <span class="identifier">unlock</span><span class="special">();</span>
+
+ <span class="keyword">void</span> <span class="identifier">lock_shared</span><span class="special">(){};</span>
+ <span class="keyword">bool</span> <span class="identifier">try_lock_shared</span><span class="special">();</span>
+ <span class="keyword">bool</span> <span class="identifier">try_lock_shared_until</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">ptime</span> <span class="special">&amp;);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">DurationType</span><span class="special">&gt;</span>
+ <span class="keyword">bool</span> <span class="identifier">try_lock_shared_for</span><span class="special">(</span><span class="identifier">DurationType</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">rel_time</span><span class="special">)</span>
+
+ <span class="keyword">void</span> <span class="identifier">unlock_shared</span><span class="special">();</span>
+
+ <span class="keyword">void</span> <span class="identifier">lock_upgrade</span><span class="special">();</span>
+ <span class="keyword">bool</span> <span class="identifier">try_lock_upgrade</span><span class="special">();</span>
+ <span class="keyword">bool</span> <span class="identifier">timed_lock_upgrade</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">ptime</span> <span class="keyword">const</span> <span class="special">&amp;);</span>
+
+ <span class="keyword">void</span> <span class="identifier">unlock_upgrade</span><span class="special">();</span>
+
+ <span class="keyword">void</span> <span class="identifier">unlock_and_lock_upgrade</span><span class="special">();</span>
+
+ <span class="keyword">void</span> <span class="identifier">unlock_and_lock_shared</span><span class="special">();</span>
+
+ <span class="keyword">void</span> <span class="identifier">unlock_upgrade_and_lock_shared</span><span class="special">();</span>
+
+ <span class="keyword">void</span> <span class="identifier">unlock_upgrade_and_lock</span><span class="special">();</span>
+
+ <span class="keyword">bool</span> <span class="identifier">try_unlock_upgrade_and_lock</span><span class="special">();</span>
+
+ <span class="keyword">bool</span> <span class="identifier">timed_unlock_upgrade_and_lock</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">ptime</span> <span class="special">&amp;);</span>
+
+ <span class="keyword">bool</span> <span class="identifier">try_unlock_share_and_lock</span><span class="special">();</span>
+
+ <span class="keyword">bool</span> <span class="identifier">try_unlock_share_and_lock_upgrade</span><span class="special">();</span>
+ <span class="special">};</span>
+
+<span class="special">}}</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.single_threaded.null_condition_hpp"></a><a href="single_threaded.html#boost_synchro.reference.single_threaded.null_condition_hpp" title="
+ Header &lt;boost/synchro/null_condition.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">null_condition</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">synchro</span> <span class="special">{</span>
+
+ <span class="keyword">class</span> <span class="identifier">null_condition</span> <span class="special">{</span>
+ <span class="keyword">private</span><span class="special">:</span>
+ <span class="identifier">null_condition</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">null_condition</span> <span class="special">&amp;);</span>
+ <span class="identifier">null_condition</span> <span class="special">&amp;</span><span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <span class="identifier">null_condition</span> <span class="special">&amp;);</span>
+ <span class="keyword">public</span><span class="special">:</span>
+ <span class="identifier">null_condition</span><span class="special">();</span>
+ <span class="special">~</span><span class="identifier">null_condition</span><span class="special">();</span>
+
+ <span class="keyword">void</span> <span class="identifier">notify_one</span><span class="special">();</span>
+
+ <span class="keyword">void</span> <span class="identifier">notify_all</span><span class="special">();</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">L</span><span class="special">&gt;</span>
+ <span class="keyword">void</span> <span class="identifier">wait</span><span class="special">(</span><span class="identifier">L</span><span class="special">&amp;</span> <span class="identifier">lock</span><span class="special">);</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">L</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Pr</span><span class="special">&gt;</span>
+ <span class="keyword">void</span> <span class="identifier">wait</span><span class="special">(</span><span class="identifier">L</span><span class="special">&amp;</span> <span class="identifier">lock</span><span class="special">,</span> <span class="identifier">Pr</span> <span class="identifier">pred</span><span class="special">);</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">L</span><span class="special">&gt;</span>
+ <span class="keyword">bool</span> <span class="identifier">timed_wait</span><span class="special">(</span><span class="identifier">L</span><span class="special">&amp;</span> <span class="identifier">lock</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">ptime</span> <span class="special">&amp;</span><span class="identifier">abs_time</span><span class="special">);</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">L</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Pr</span><span class="special">&gt;</span>
+ <span class="keyword">bool</span> <span class="identifier">timed_wait</span><span class="special">(</span><span class="identifier">L</span><span class="special">&amp;</span> <span class="identifier">lock</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">ptime</span> <span class="special">&amp;</span><span class="identifier">abs_time</span><span class="special">,</span> <span class="identifier">Pr</span> <span class="identifier">pred</span><span class="special">);</span>
+
+ <span class="special">};</span>
+ <span class="keyword">template</span> <span class="special">&lt;&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">best_condition</span><span class="special">&lt;</span><span class="identifier">null_mutex</span><span class="special">&gt;</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">null_condition</span> <span class="identifier">type</span><span class="special">;</span>
+ <span class="special">};</span>
+<span class="special">}}</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.reference.single_threaded.null_synchronization_family_hpp"></a><a href="single_threaded.html#boost_synchro.reference.single_threaded.null_synchronization_family_hpp" title="
+ Header &lt;boost/synchro/null_synchronization_family.hpp&gt;">
+ Header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">synchro</span><span class="special">/</span><span class="identifier">null_synchronization_family</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl><dt><span class="section"><a href="single_threaded.html#boost_synchro.reference.single_threaded.null_synchronization_family_hpp.class__null_synchronization_policy_">Class
+ <code class="computeroutput"><span class="identifier">null_synchronization_policy</span></code></a></span></dt></dl></div>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">synchro</span> <span class="special">{</span>
+ <span class="keyword">struct</span> <span class="identifier">null_synchronization_family</span><span class="special">;</span>
+<span class="special">}}</span>
+</pre>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.reference.single_threaded.null_synchronization_family_hpp.class__null_synchronization_policy_"></a><a href="single_threaded.html#boost_synchro.reference.single_threaded.null_synchronization_family_hpp.class__null_synchronization_policy_" title="Class
+ null_synchronization_policy">Class
+ <code class="computeroutput"><span class="identifier">null_synchronization_policy</span></code></a>
+</h5></div></div></div>
+<p>
+ <span class="bold"><strong>Synopsis</strong></span>
+ </p>
+<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">null_synchronization_family</span>
+<span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">synchro</span><span class="special">::</span><span class="identifier">null_mutex</span> <span class="identifier">mutex_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">synchro</span><span class="special">::</span><span class="identifier">null_mutex</span> <span class="identifier">recursive_mutex_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">synchro</span><span class="special">::</span><span class="identifier">null_mutex</span> <span class="identifier">timed_mutex_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">synchro</span><span class="special">::</span><span class="identifier">null_mutex</span> <span class="identifier">recursive_timed_mutex_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">synchro</span><span class="special">::</span><span class="identifier">null_mutex</span> <span class="identifier">shared_mutex_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">synchro</span><span class="special">::</span><span class="identifier">null_condition</span> <span class="identifier">condition_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">synchro</span><span class="special">::</span><span class="identifier">null_condition</span> <span class="identifier">condition_any_type</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+</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"><div class="copyright-footer">Copyright © 2008 Vicente J. Botet Escriba<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="lockers.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="multi_threaded.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/synchro/libs/synchro/doc/html/boost_synchro/users_guide.html
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/html/boost_synchro/users_guide.html 2009-10-12 17:49:35 EDT (Mon, 12 Oct 2009)
@@ -0,0 +1,67 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title> Users'Guide</title>
+<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+<link rel="start" href="../index.html" title="Chapter 1. Boost.Synchro">
+<link rel="up" href="../index.html" title="Chapter 1. Boost.Synchro">
+<link rel="prev" href="overview/intro.html" title=" Introduction">
+<link rel="next" href="users_guide/getting_started.html" title=" Getting Started">
+</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">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="overview/intro.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="users_guide/getting_started.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="boost_synchro.users_guide"></a> Users'Guide
+</h2></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"> Getting Started</span></dt>
+<dd><dl>
+<dt><span class="section"><a href="users_guide/getting_started.html#boost_synchro.users_guide.getting_started.install">
+ Installing Synchro</a></span></dt>
+<dt><span class="section"><a href="users_guide/getting_started.html#boost_synchro.users_guide.getting_started.hello_world__">Hello
+ World! </a></span></dt>
+</dl></dd>
+<dt><span class="section"> Tutorial</span></dt>
+<dd><dl>
+<dt><span class="section">Lockables</span></dt>
+<dt><span class="section"><a href="users_guide/tutorial.html#boost_synchro.users_guide.tutorial.internal_locking__monitors">Internal
+ Locking--Monitors</a></span></dt>
+<dt><span class="section">volatile and locking_ptr</span></dt>
+<dt><span class="section"><a href="users_guide/tutorial.html#boost_synchro.users_guide.tutorial.external_locking_____strict_locker__and__externally_locked__classes">External
+ Locking -- <code class="computeroutput"><span class="identifier">strict_locker</span></code>
+ and <code class="computeroutput"><span class="identifier">externally_locked</span></code> classes</a></span></dt>
+</dl></dd>
+<dt><span class="section"> References</span></dt>
+<dt><span class="section"> Glossary</span></dt>
+</dl></div>
+<p>
+ [/
+ </p>
+</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">Copyright © 2008 Vicente J. Botet Escriba<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="overview/intro.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="users_guide/getting_started.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/synchro/libs/synchro/doc/html/boost_synchro/users_guide/ext_references.html
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/html/boost_synchro/users_guide/ext_references.html 2009-10-12 17:49:35 EDT (Mon, 12 Oct 2009)
@@ -0,0 +1,86 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title> References</title>
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+<link rel="start" href="../../index.html" title="Chapter 1. Boost.Synchro">
+<link rel="up" href="../users_guide.html" title=" Users'Guide">
+<link rel="prev" href="tutorial.html" title=" Tutorial">
+<link rel="next" href="glosary.html" title=" Glossary">
+</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">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="tutorial.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../users_guide.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="glosary.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_synchro.users_guide.ext_references"></a> References
+</h3></div></div></div>
+<div class="variablelist">
+<p class="title"><b></b></p>
+<dl>
+<dt><span class="term"> <span class="bold"><strong>Toward Simplified
+ Parallel Support in C++</strong></span></span></dt>
+<dd><p>
+ Justin E. Gottschlich &amp; Paul J. Rogers, 2009 - Not yet published
+ </p></dd>
+<dt><span class="term">N1833 - Preliminary Threading Library Proposal for TR2</span></dt>
+<dd><p>
+ Kevlin Henney, 2005
+ </p></dd>
+<dt><span class="term">More C++ Threading - From Procedural to Generic, by Example</span></dt>
+<dd><p>
+ Kevlin Henney
+ </p></dd>
+<dt><span class="term">C++ Threading - A Generic-Programming Approach</span></dt>
+<dd><p>
+ Kevlin Henney, April 16, 2004
+ </p></dd>
+<dt><span class="term">Multithreading and the C++ Type System</span></dt>
+<dd><p>
+ Andrei Alexandrescu, Febraury 8, 2002
+ </p></dd>
+<dt><span class="term">volatile - Multithreaded Programmer's Best Friend</span></dt>
+<dd><p>
+ Andrei Alexandrescu, Febraury 1, 2001
+ </p></dd>
+<dt><span class="term">Asynchronous C++</span></dt>
+<dd><p>
+ Kevlin Henney, September 9, 1996.
+ </p></dd>
+<dt><span class="term"><a href="http://www.cs.wustl.edu/~schmidt/PDF/ACE-concurrency.pdf" target="_top"><span class="bold"><strong>An OO Encapsulation of Lightweight OS Concurrency Mechanisms
+ in the ACE Toolkit</strong></span></a></span></dt>
+<dd><p>
+ Douglas C. Schmidt
+ </p></dd>
+<dt><span class="term">ACE </span></dt>
+<dd><p>
+ Douglas C. Schmidt
+ </p></dd>
+</dl>
+</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">Copyright © 2008 Vicente J. Botet Escriba<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="tutorial.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../users_guide.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="glosary.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/synchro/libs/synchro/doc/html/boost_synchro/users_guide/getting_started.html
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/html/boost_synchro/users_guide/getting_started.html 2009-10-12 17:49:35 EDT (Mon, 12 Oct 2009)
@@ -0,0 +1,159 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title> Getting Started</title>
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+<link rel="start" href="../../index.html" title="Chapter 1. Boost.Synchro">
+<link rel="up" href="../users_guide.html" title=" Users'Guide">
+<link rel="prev" href="../users_guide.html" title=" Users'Guide">
+<link rel="next" href="tutorial.html" title=" Tutorial">
+</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">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../users_guide.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../users_guide.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="tutorial.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_synchro.users_guide.getting_started"></a> Getting Started
+</h3></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="getting_started.html#boost_synchro.users_guide.getting_started.install">
+ Installing Synchro</a></span></dt>
+<dt><span class="section"><a href="getting_started.html#boost_synchro.users_guide.getting_started.hello_world__">Hello
+ World! </a></span></dt>
+</dl></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.users_guide.getting_started.install"></a><a href="getting_started.html#boost_synchro.users_guide.getting_started.install" title="
+ Installing Synchro">
+ Installing Synchro</a>
+</h4></div></div></div>
+<a name="boost_synchro.users_guide.getting_started.install.getting_boost_synchro"></a><h5>
+<a name="id4818634"></a>
+ <a href="getting_started.html#boost_synchro.users_guide.getting_started.install.getting_boost_synchro">Getting
+ Boost.Synchro</a>
+ </h5>
+<p>
+ You can get the last stable release of Boost.Synchro by downloading <code class="literal">synchro.zip</code>
+ from the <a href="http://www.boost-consulting.com/vault/index.php?directory=Concurrent%20Programming" target="_top">Boost
+ Vault</a>
+ </p>
+<p>
+ You can also access the latest (unstable?) state from the <a href="https://svn.boost.org/svn/boost/sandbox/synchro" target="_top">Boost
+ Sandbox</a>.
+ </p>
+<a name="boost_synchro.users_guide.getting_started.install.building_boost_synchro"></a><h5>
+<a name="id4818681"></a>
+ <a href="getting_started.html#boost_synchro.users_guide.getting_started.install.building_boost_synchro">Building
+ Boost.Synchro</a>
+ </h5>
+<p>
+ There is no need to compile <span class="bold"><strong>Boost.Synchro</strong></span>,
+ since it's a header only library. Just include your Boost header directory
+ in your compiler include path.
+ </p>
+<a name="boost_synchro.users_guide.getting_started.install.requirements"></a><h5>
+<a name="id4818713"></a>
+ Requirements
+ </h5>
+<p>
+ <span class="bold"><strong>Boost.Synchro</strong></span> depends on Boost. You must
+ use either Boost version 1.38.x or the version in SVN trunk (even if Boost
+ version 1.35.x should works also). In particular, <span class="bold"><strong>Boost.Synchro</strong></span>
+ depends on:
+ </p>
+<div class="variablelist">
+<p class="title"><b></b></p>
+<dl>
+<dt><span class="term">Boost.Interprocess</span></dt>
+<dd><p>
+ interprocess synchronization primitives
+ </p></dd>
+<dt><span class="term">Boost.MPL</span></dt>
+<dd><p>
+ for all the meta programing task
+ </p></dd>
+<dt><span class="term">Boost.Thread</span></dt>
+<dd><p>
+ thread synchronization primitives
+ </p></dd>
+</dl>
+</div>
+<a name="boost_synchro.users_guide.getting_started.install.exceptions_safety"></a><h5>
+<a name="id4818815"></a>
+ <a href="getting_started.html#boost_synchro.users_guide.getting_started.install.exceptions_safety">Exceptions
+ safety</a>
+ </h5>
+<p>
+ All functions in the library are exception-neutral and provide strong guarantee
+ of exception safety as long as the underlying parameters provide it.
+ </p>
+<a name="boost_synchro.users_guide.getting_started.install.thread_safety"></a><h5>
+<a name="id4818841"></a>
+ <a href="getting_started.html#boost_synchro.users_guide.getting_started.install.thread_safety">Thread
+ safety</a>
+ </h5>
+<p>
+ All functions in the library are thread-unsafe except when noted explicitly.
+ </p>
+<a name="boost_synchro.users_guide.getting_started.install.tested_compilers"></a><h5>
+<a name="id4818865"></a>
+ <a href="getting_started.html#boost_synchro.users_guide.getting_started.install.tested_compilers">Tested
+ compilers</a>
+ </h5>
+<p>
+ Currently, <span class="bold"><strong>Boost.Synchro</strong></span> has been tested
+ in the following compilers/platforms:
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ GCC 3.4.4 Cygwin
+ </li>
+<li>
+ GCC 3.4.6 Linux
+ </li>
+<li>
+ GCC 4.1.2 Linux
+ </li>
+</ul></div>
+<div class="note"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/html/images/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ Please send any questions, comments and bug reports to boost &lt;at&gt;
+ lists &lt;dot&gt; boost &lt;dot&gt; org.
+ </p></td></tr>
+</table></div>
+</div>
+<div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.users_guide.getting_started.hello_world__"></a><a href="getting_started.html#boost_synchro.users_guide.getting_started.hello_world__" title="Hello
+ World! ">Hello
+ World! </a>
+</h4></div></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"><div class="copyright-footer">Copyright © 2008 Vicente J. Botet Escriba<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../users_guide.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../users_guide.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="tutorial.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/synchro/libs/synchro/doc/html/boost_synchro/users_guide/glosary.html
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/html/boost_synchro/users_guide/glosary.html 2009-10-12 17:49:35 EDT (Mon, 12 Oct 2009)
@@ -0,0 +1,72 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title> Glossary</title>
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+<link rel="start" href="../../index.html" title="Chapter 1. Boost.Synchro">
+<link rel="up" href="../users_guide.html" title=" Users'Guide">
+<link rel="prev" href="ext_references.html" title=" References">
+<link rel="next" href="../reference.html" title="Reference">
+</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">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="ext_references.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../users_guide.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../reference.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_synchro.users_guide.glosary"></a> Glossary
+</h3></div></div></div>
+<div class="variablelist">
+<p class="title"><b></b></p>
+<dl>
+<dt><span class="term">lockable</span></dt>
+<dd><p>
+ .
+ </p></dd>
+<dt><span class="term">reentrancy</span></dt>
+<dd><p>
+ .
+ </p></dd>
+<dt><span class="term">lock</span></dt>
+<dd><p>
+ .
+ </p></dd>
+<dt><span class="term">locker</span></dt>
+<dd><p>
+ .
+ </p></dd>
+<dt><span class="term">lifetime</span></dt>
+<dd><p>
+ .
+ </p></dd>
+<dt><span class="term">scope</span></dt>
+<dd><p>
+ .
+ </p></dd>
+</dl>
+</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">Copyright © 2008 Vicente J. Botet Escriba<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="ext_references.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../users_guide.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../reference.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/synchro/libs/synchro/doc/html/boost_synchro/users_guide/tutorial.html
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/html/boost_synchro/users_guide/tutorial.html 2009-10-12 17:49:35 EDT (Mon, 12 Oct 2009)
@@ -0,0 +1,3266 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title> Tutorial</title>
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+<link rel="start" href="../../index.html" title="Chapter 1. Boost.Synchro">
+<link rel="up" href="../users_guide.html" title=" Users'Guide">
+<link rel="prev" href="getting_started.html" title=" Getting Started">
+<link rel="next" href="ext_references.html" title=" References">
+</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">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="getting_started.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../users_guide.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="ext_references.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_synchro.users_guide.tutorial"></a> Tutorial
+</h3></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section">Lockables</span></dt>
+<dt><span class="section"><a href="tutorial.html#boost_synchro.users_guide.tutorial.internal_locking__monitors">Internal
+ Locking--Monitors</a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="tutorial.html#boost_synchro.users_guide.tutorial.internal_locking__monitors.concurrent_threads_of_execution">Concurrent
+ threads of execution</a></span></dt>
+<dt><span class="section">Monitors</span></dt>
+</dl></dd>
+<dt><span class="section">volatile and locking_ptr</span></dt>
+<dd><dl>
+<dt><span class="section"><a href="tutorial.html#boost_synchro.users_guide.tutorial._volatile___and__locking_ptr_.just_a_little_keyword">Just
+ a Little Keyword</a></span></dt>
+<dt><span class="section"><a href="tutorial.html#boost_synchro.users_guide.tutorial._volatile___and__locking_ptr_.using__volatile__with_user_defined_types">Using
+ <code class="computeroutput"><span class="keyword">volatile</span></code> with User-Defined
+ Types</a></span></dt>
+<dt><span class="section">volatile, Critical Sections, and Race Conditions</span></dt>
+<dt><span class="section">locking_ptr</span></dt>
+<dt><span class="section"><a href="tutorial.html#boost_synchro.users_guide.tutorial._volatile___and__locking_ptr_.back_to_primitive_types">Back
+ to Primitive Types</a></span></dt>
+<dt><span class="section">volatile Member Functions</span></dt>
+<dt><span class="section"><a href="tutorial.html#boost_synchro.users_guide.tutorial._volatile___and__locking_ptr_.generic__locking_ptr_">Generic
+ <code class="computeroutput"><span class="identifier">locking_ptr</span></code></a></span></dt>
+<dt><span class="section"><a href="tutorial.html#boost_synchro.users_guide.tutorial._volatile___and__locking_ptr_.specific__locking_ptr__for_lockable_value_types">Specific
+ <code class="computeroutput"><span class="identifier">locking_ptr</span></code> for lockable
+ value types</a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="tutorial.html#boost_synchro.users_guide.tutorial.external_locking_____strict_locker__and__externally_locked__classes">External
+ Locking -- <code class="computeroutput"><span class="identifier">strict_locker</span></code>
+ and <code class="computeroutput"><span class="identifier">externally_locked</span></code> classes</a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="tutorial.html#boost_synchro.users_guide.tutorial.external_locking_____strict_locker__and__externally_locked__classes.locks_as_permits">Locks
+ as Permits</a></span></dt>
+<dt><span class="section"><a href="tutorial.html#boost_synchro.users_guide.tutorial.external_locking_____strict_locker__and__externally_locked__classes.improving_external_locking">Improving
+ External Locking</a></span></dt>
+<dt><span class="section"><a href="tutorial.html#boost_synchro.users_guide.tutorial.external_locking_____strict_locker__and__externally_locked__classes.allowing_other_strict_lockers">Allowing
+ other strict lockers</a></span></dt>
+</dl></dd>
+</dl></div>
+<p>
+ [info The contents of this tutorial is an adaptation of the papers of Andrei
+ Alexandrescu, Kevlin Henney and the concurrent part of the BETA Programming
+ Language.]
+ </p>
+<p>
+ Concurrent components may interact in different ways: they may access the
+ same shared objects by, for example, executing functions of these objects;
+ or they may communicate directly by executing functions of each other.
+ </p>
+<p>
+ Concurrent execution of objects requires a mechanism for synchronizing the
+ access to shared objects, just as direct communication between objects may
+ require synchronization. The basic mechanism for synchronization in Boost.Threads
+ and Boost.Interprocess are the well known mutex and condition_variables.
+ Mutexes and condition variables are, however, only useful for very simple
+ synchronization problems. The Synchro Library therefore introduce high-level
+ abstractions for handling more complicated synchronization problems, including
+ monitor for guaranteeing exclusive access to an object, controlling external
+ locking and last a so-called rendezvous mechanism for handling direct communication
+ between objects. All the concurrency abstractions being introduced are defined
+ by means of mutexes an conditions.
+ </p>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.users_guide.tutorial.lockables"></a>Lockables
+</h4></div></div></div>
+<div class="note"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/html/images/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ The following is an adaptation of the article "C++ Threading - A
+ Generic-Programming Approach" by Kevin Henney.
+ </p></td></tr>
+</table></div>
+<p>
+ <span class="bold"><strong>Lock substitutability</strong></span>
+ </p>
+<p>
+ The Boost (C++0x) mutexes have associated a category which form a sub-typing
+ hierarchy: ExclusiveLock &lt;- SharableLock &lt;- UpgradableLock
+ </p>
+<pre class="programlisting"><span class="identifier">exclusive_lock</span> <span class="special">&lt;-</span> <span class="identifier">sharable_lock</span> <span class="special">&lt;-</span> <span class="identifier">upgradable_lock</span>
+</pre>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">exclusive_lock_tag</span> <span class="special">{};</span>
+<span class="keyword">struct</span> <span class="identifier">sharable_lock_tag</span> <span class="special">:</span> <span class="identifier">exclusive_lock_tag</span> <span class="special">{};</span>
+<span class="keyword">struct</span> <span class="identifier">upgradable_lock_tag</span> <span class="special">:</span> <span class="identifier">sharable_lock_tag</span> <span class="special">{};</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Locking behavior can be further categorized as:
+ </p>
+<div class="itemizedlist"><ul type="disc"><li>
+ Re-entrancy: recursive or not
+ </li></ul></div>
+<pre class="programlisting"><span class="identifier">non_recursive</span> <span class="special">&lt;-</span> <span class="identifier">recursive</span>
+</pre>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">non_recursive_tag</span> <span class="special">{};</span>
+<span class="keyword">struct</span> <span class="identifier">recursive_tag</span> <span class="special">:</span> <span class="identifier">non_recursive_tag</span> <span class="special">{};</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<div class="itemizedlist"><ul type="disc"><li>
+ Scope: whether the lock is usable with a mono-threaded, multi-threaded
+ or multi-process context
+ </li></ul></div>
+<pre class="programlisting"><span class="identifier">mono_threaded</span> <span class="special">&lt;-</span> <span class="identifier">multi_threaded</span> <span class="special">&lt;-</span> <span class="identifier">multi_process</span>
+</pre>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">mono_threaded_tag</span> <span class="special">{};</span>
+<span class="keyword">struct</span> <span class="identifier">multi_threaded_tag</span> <span class="special">:</span> <span class="identifier">mono_threaded_tag</span> <span class="special">{};</span>
+<span class="keyword">struct</span> <span class="identifier">multi_process_tag</span> <span class="special">:</span> <span class="identifier">multi_threaded_tag</span> <span class="special">{};</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<div class="itemizedlist"><ul type="disc"><li>
+ Lifetime: The lifetime of a lock could be associated to the process,
+ the kernel or the file-system
+ </li></ul></div>
+<pre class="programlisting"><span class="identifier">process_lifetime</span> <span class="special">&lt;-</span> <span class="identifier">kernel_lifetime</span> <span class="special">&lt;-</span> <span class="identifier">filesystem_lifetime</span>
+</pre>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">process_lifetime_tag</span> <span class="special">{};</span>
+<span class="keyword">struct</span> <span class="identifier">kernel_lifetime_tag</span> <span class="special">:</span> <span class="identifier">process_lifetime_tag</span> <span class="special">{};</span>
+<span class="keyword">struct</span> <span class="identifier">filesystem_lifetime_tag</span> <span class="special">:</span> <span class="identifier">kernel_lifetime_tag</span> <span class="special">{};</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<div class="itemizedlist"><ul type="disc"><li>
+ Timed interface: has or not a timed interfaces
+ </li></ul></div>
+<pre class="programlisting"><span class="identifier">hasnt_timed_interface</span> <span class="special">&lt;-</span> <span class="identifier">has_timed_interface</span>
+</pre>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">hasnt_timed_interface_tag</span> <span class="special">{};</span>
+<span class="keyword">struct</span> <span class="identifier">has_timed_interface_tag</span> <span class="special">:</span> <span class="identifier">hasnt_timed_interface_tag</span> <span class="special">{};</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Substitutability applies both to the degree of syntactic support and to
+ the locking semantics
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ A recursive mutex and binary semaphore are substitutable in code written
+ against a exclusive mutex
+ </li>
+<li>
+ A null mutex is substitutable for all others in a single-threaded environment
+ </li>
+</ul></div>
+<p>
+ We can see these axes of variation expressed against some Boost synchronization
+ mechanisms (from now bip stands for boost::interprocess):
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ boost::mutex: ExclusiveLock, non-recursive, has-not-timed-interface,
+ multi-threaded
+ </li>
+<li>
+ boost::shared_mutex: UpgradableLock, non-recursive, has-timed-interface,
+ multi-threaded
+ </li>
+<li>
+ bip::sync::null_mutex: UpgradableLock, recursive, has-timed-interface,
+ mono-threaded
+ </li>
+<li>
+ bip::sync::interprocess_recursive_mutex ExclusiveLock, recursive, has-timed-interface,
+ multi_process.
+ </li>
+</ul></div>
+<p>
+ <span class="bold"><strong>Lock traits</strong></span>
+ </p>
+<p>
+ Generic programming (writing code which works with any data type meeting
+ a set of requirements) has become the method of choice for providing reusable
+ code.
+ </p>
+<p>
+ However, there are times in generic programming when "generic"
+ just isn't good enough - sometimes the differences between types are too
+ large for an efficient generic implementation. This is when the traits
+ technique becomes important - by encapsulating those properties that need
+ to be considered on a type by type basis inside a traits class, we can
+ minimize the amount of code that has to differ from one type to another,
+ and maximize the amount of generic code.
+ </p>
+<p>
+ Consider an example:
+ </p>
+<p>
+ Boost.Synchro follow the design of Boost.TypeTraits, and contains a set
+ of very specific traits classes, each of which encapsulate a single trait
+ from the Lockable or Locker concepts; for example, is the lock recursive?
+ Or does the lock have a timed interface?
+ </p>
+<p>
+ The Boost.Synchro traits classes share a unified design: each class inherits
+ from a the type true_type if the type has the specified property and inherits
+ from false_type otherwise. As we will show, these classes can be used in
+ generic programming to determine the properties of a given lock type and
+ introduce optimizations that are appropriate for that case.
+ </p>
+<p>
+ The type-traits library also contains a set of classes that perform a specific
+ transformation on a type; for example, they can remove a top-level const
+ or volatile qualifier from a type. Each class that performs a transformation
+ defines a single typedef-member type that is the result of the transformation.
+ All of the type-traits classes are defined inside namespace boost; for
+ brevity, namespace-qualification is omitted in most of the code samples
+ given.
+ </p>
+<p>
+ <span class="bold"><strong>Implementation</strong></span>
+ </p>
+<p>
+ Most of the implementation is fairly repetitive anyway, so here we will
+ just give you a flavor for how some of the classes are implemented. See
+ the reference section for the full details.
+ </p>
+<p>
+ A lockable implementer must specialize the scope_tag template class. By
+ default the scope_tag forward to a nested type scope.
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">scope_tag</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">::</span><span class="identifier">scope</span> <span class="identifier">type</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ So the implementer can either have a nested type scope or inherit from
+ the helper lock_traits_base.
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">Scope</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">Category</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">Reentrancy</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">TimedInterface</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">Lifetime</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">Naming</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">Base</span>
+<span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">lock_traits_base</span> <span class="special">:</span> <span class="identifier">Base</span> <span class="special">{</span>
+ <span class="comment">// TODO add constraints on typenames
+</span> <span class="keyword">typedef</span> <span class="identifier">Scope</span> <span class="identifier">scope</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">Category</span> <span class="identifier">category</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">Reentrancy</span> <span class="identifier">reentrancy</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">TimedInterface</span> <span class="identifier">timed_interface</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">Lifetime</span> <span class="identifier">lifetime</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">Naming</span> <span class="identifier">naming</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ which defines the correct types. The lock_traits_base has a lot of parameters,
+ and the defaults are the ones from boost::mutex. So Boost.Thread could
+ use it as follows
+ </p>
+<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">mutex</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">lock_traits_base</span><span class="special">&lt;&gt;</span> <span class="special">{</span>
+ <span class="comment">// ...
+</span><span class="special">};</span>
+</pre>
+<p>
+ Waiting for that Boost.Synchro specialize the scope_tag in the synchro/thread/mutex.hpp
+ file.
+ </p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">scope_tag</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mutex</span><span class="special">&gt;</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">multi_threaded_tag</span> <span class="identifier">type</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+<p>
+ So the user must include this file to make boost::mutex a model of Lockable
+ for Boost.Synchro.
+ </p>
+<p>
+ For example the trait is_multi_threaded is defined as : If Lockable has
+ a scope_tag that inherits from multi_threaded_tag then inherits from true_type,
+ otherwise inherits from false_type.
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">is_multi_threaded</span>
+ <span class="special">:</span> <span class="identifier">is_same_or_is_base_and_derived</span><span class="special">&lt;</span>
+ <span class="identifier">multi_threaded_tag</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">scope_tag</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="special">&gt;</span>
+<span class="special">{};</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ <span class="bold"><strong>Finding the best lock</strong></span>
+ </p>
+<p>
+ Inverse traits can match a lockable type based on specific traits, for
+ a given family of lock types.
+ </p>
+<p>
+ It is also possible to specify characteristics to perform a reverse lookup
+ to find a primitive lock type, either by exact match or by substitutable
+ match.
+ </p>
+<pre class="programlisting"><span class="identifier">find_best_lock</span><span class="special">&lt;&gt;::</span><span class="identifier">type</span> <span class="special">==</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">mutex</span>
+<span class="identifier">find_best_lock</span><span class="special">&lt;</span><span class="identifier">mono_threaded_tag</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="special">==</span> <span class="identifier">bsync</span><span class="special">::</span><span class="identifier">null_mutex</span>
+<span class="identifier">find_best_lock</span><span class="special">&lt;</span><span class="identifier">multi_threaded_tag</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="special">==</span> <span class="identifier">bsync</span><span class="special">::</span><span class="identifier">thread_mutex</span>
+<span class="identifier">find_best_lock</span><span class="special">&lt;</span><span class="identifier">multi_process_tag</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="special">==</span> <span class="identifier">bsync</span><span class="special">::</span><span class="identifier">interprocess_mutex</span>
+</pre>
+<p>
+ The user can also find a lock using mpl constraints as follows
+ </p>
+<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">find_best_lock_between</span><span class="special">&lt;</span><span class="identifier">Lockables</span><span class="special">,</span>
+ <span class="identifier">mpl</span><span class="special">::</span><span class="keyword">and</span><span class="special">&lt;</span><span class="identifier">is_multi_threaded</span><span class="special">&lt;</span><span class="identifier">_</span><span class="special">&gt;,</span> <span class="identifier">is_recursive</span><span class="special">&lt;</span><span class="identifier">_</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">best</span><span class="special">;</span>
+</pre>
+<p>
+ <span class="bold"><strong>Synchronization family</strong></span>
+ </p>
+<p>
+ A class that will do internal locking can be parameterized by the type
+ of synchronization familly needed to achieve the desired level of concurrency
+ control. This could depends of the usage scope of this class, and this
+ can be mono_threaded, multi_threaded, multi_process.
+ </p>
+<p>
+ For example the thread_synchronization_family can be used to instantiate
+ a message_queue class in a multi_threaded environment, all public methods
+ will be thread-safe, with the corresponding overhead that implies. In contrast,
+ if a null_synchronization_policy class is used to instantiate message_queue,
+ all public methods will not be thread-safe, and there will be no additional
+ overhead. A synchronization family must define typedef as for example
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">synchronization_family</span><span class="special">&lt;</span><span class="identifier">multi_threaded_tag</span><span class="special">&gt;</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">thread_mutex</span> <span class="identifier">mutex_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">thread_recursive_mutex</span> <span class="identifier">recursive_mutex_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">thread_timed_mutex</span> <span class="identifier">timed_mutex_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">thread_recursive_timed_mutex</span> <span class="identifier">recursive_timed_mutex_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">thread_shared_mutex</span> <span class="identifier">shared_mutex_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">condition_variable</span> <span class="identifier">condition_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">condition_variable_any</span> <span class="identifier">condition_type_any</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ <span class="bold"><strong>Lockable concept</strong></span>
+ </p>
+<p>
+ For the main category clasification, the library provides concept classes
+ that can be used with Boost.ConceptCheck. For example LockableConcept object
+ supports the basic features required to delimit a critical region. Supports
+ the basic lock, unlock and try_lock functions and defines the lock traits.
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">LockableConcept</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">category_tag</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">category</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">timed_interface_tag</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">timed_interface</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">reentrancy_tag</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">reentrancy</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">scope_tag</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">scope</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">lifetime_tag</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">lifetime</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">naming_tag</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">naming</span><span class="special">;</span>
+
+ <span class="identifier">BOOST_CONCEPT_USAGE</span><span class="special">(</span><span class="identifier">LockableConcept</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">lockable</span><span class="special">::</span><span class="identifier">lock</span><span class="special">(</span><span class="identifier">l</span><span class="special">);</span>
+ <span class="identifier">lockable</span><span class="special">::</span><span class="identifier">unlock</span><span class="special">(</span><span class="identifier">l</span><span class="special">);</span>
+ <span class="identifier">lockable</span><span class="special">::</span><span class="identifier">try_lock</span><span class="special">(</span><span class="identifier">l</span><span class="special">);</span>
+ <span class="special">}</span>
+ <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">l</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ The user can now check staticaly that the template parameter is a model
+ of Locable as follows
+ </p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="string">"boost/synchro/lockable_concepts.hpp"</span>
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">my_class</span> <span class="special">{</span>
+ <span class="identifier">BOOST_CONCEPT_ASSERT</span><span class="special">((</span><span class="identifier">LockableConcept</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;));</span>
+ <span class="comment">// ...
+</span><span class="special">};</span>
+</pre>
+<p>
+ The same can be done for TimedLockableConcept, ShareLockableConcept and
+ UpgradeLockableConcept (See the reference section for more details).
+ </p>
+<p>
+ <span class="bold"><strong>Syntactic lock traits</strong></span>
+ </p>
+<p>
+ The locks on Boost.Thread and Boost::Interprocess do not follow the same
+ interface. Most of the differences can be handled through traits, but other
+ are better handled by adapting the interface.
+ </p>
+<p>
+ The * The scoped locks live in a different namespace and some have different
+ names with the same semantic.
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">scoped_lock_type</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">lockable_scope_traits</span><span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">scope_tag</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">,</span> <span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">scoped_lock</span> <span class="identifier">type</span><span class="special">;</span>
+<span class="special">};</span>
+
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">unique_lock_type</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">lockable_scope_traits</span><span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">scope_tag</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">,</span> <span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">unique_lock</span> <span class="identifier">type</span><span class="special">;</span>
+<span class="special">};</span>
+
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">shared_lock_type</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">lockable_scope_traits</span><span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">scope_tag</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">,</span> <span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">shared_lock</span> <span class="identifier">type</span><span class="special">;</span>
+<span class="special">};</span>
+
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">upgrade_lock_type</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">lockable_scope_traits</span><span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">scope_tag</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">,</span> <span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">upgrade_lock</span> <span class="identifier">type</span><span class="special">;</span>
+<span class="special">};</span>
+
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">upgrade_to_unique_locker_type</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">lockable_scope_traits</span><span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">scope_tag</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">,</span> <span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">upgrade_to_unique_locker</span> <span class="identifier">type</span><span class="special">;</span>
+<span class="special">};</span>
+
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ So instead of using directly the locker of the respective libraries, use
+ these traits.
+ </p>
+<pre class="programlisting"><span class="identifier">bsync</span><span class="special">::</span><span class="identifier">shared_lock_type</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">lock</span><span class="special">(</span><span class="identifier">mutex_</span><span class="special">);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc"><li>
+ The exception thrown lives in a different name space and different names
+ with the same semantic.
+ </li></ul></div>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">lock_error_type</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">lockable_scope_traits</span><span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">scope_tag</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">,</span> <span class="identifier">Lockable</span>
+ <span class="special">&gt;::</span><span class="identifier">lock_error</span> <span class="identifier">type</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ So instead of using directly the exception type of the respective libraries,
+ use these traits.
+ </p>
+<pre class="programlisting"><span class="keyword">try</span> <span class="special">{</span>
+ <span class="comment">// ...
+</span><span class="special">}</span> <span class="keyword">catch</span> <span class="special">(</span><span class="identifier">bsync</span><span class="special">::</span><span class="identifier">lock_error_type</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">&amp;</span> <span class="identifier">ex</span><span class="special">)</span> <span class="special">{</span>
+ <span class="comment">// ...
+</span><span class="special">}</span>
+</pre>
+<div class="itemizedlist"><ul type="disc"><li>
+ The move semantics (&amp;&amp;) are expressed with a class named differently.
+ </li></ul></div>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">move_object_type</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">moved_object</span> <span class="special">:</span> <span class="identifier">lockable_scope_traits</span><span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">scope_tag</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">,</span> <span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="keyword">template</span> <span class="identifier">moved_object</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="special">{</span>
+ <span class="identifier">moved_object</span><span class="special">(</span><span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">t_</span><span class="special">):</span> <span class="identifier">lockable_scope_traits</span><span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">scope_tag</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">,</span> <span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="keyword">template</span> <span class="identifier">moved_object</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;(</span><span class="identifier">t_</span><span class="special">)</span> <span class="special">{}</span>
+ <span class="special">};</span>
+<span class="special">};</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<div class="itemizedlist"><ul type="disc"><li>
+ The scoped locks can be initialized with static const variables in order
+ to overload the constructor for lock adoption, lock deferral or try to
+ lock. Even if the name of these variables is the same, these variables
+ live in different namespace.
+ </li></ul></div>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">defer_lock_type</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">lockable_scope_traits</span><span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">scope_tag</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">,</span> <span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">defer_lock_t</span> <span class="identifier">type</span><span class="special">;</span>
+ <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">type</span><span class="special">&amp;</span> <span class="identifier">value</span><span class="special">()</span> <span class="special">{</span><span class="keyword">return</span> <span class="identifier">lockable_scope_traits</span><span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">scope_tag</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">,</span> <span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">defer_lock</span><span class="special">();}</span>
+<span class="special">};</span>
+
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">adopt_lock_type</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">lockable_scope_traits</span><span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">scope_tag</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">,</span> <span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">adopt_lock_t</span> <span class="identifier">type</span><span class="special">;</span>
+ <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">type</span><span class="special">&amp;</span> <span class="identifier">value</span><span class="special">(){</span><span class="keyword">return</span> <span class="identifier">lockable_scope_traits</span><span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">scope_tag</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">,</span> <span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">adopt_lock</span><span class="special">();}</span>
+<span class="special">};</span>
+
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">try_to_lock_type</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">lockable_scope_traits</span><span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">scope_tag</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">,</span> <span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">try_to_lock_t</span> <span class="identifier">type</span><span class="special">;</span>
+ <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">type</span><span class="special">&amp;</span> <span class="identifier">value</span><span class="special">(){</span><span class="keyword">return</span> <span class="identifier">lockable_scope_traits</span><span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">scope_tag</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">,</span> <span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">try_to_lock</span><span class="special">();}</span>
+<span class="special">};</span>
+
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ So instead of using directly the variables of the respective libraries,
+ use these traits.
+ </p>
+<pre class="programlisting"><span class="identifier">bsync</span><span class="special">::</span><span class="identifier">shared_lock_type</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">lock</span><span class="special">(</span><span class="identifier">mutex_</span><span class="special">,</span> <span class="identifier">bsync</span><span class="special">::</span><span class="identifier">try_to_lock_type</span><span class="special">::</span><span class="identifier">value</span><span class="special">());</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.users_guide.tutorial.internal_locking__monitors"></a><a href="tutorial.html#boost_synchro.users_guide.tutorial.internal_locking__monitors" title="Internal
+ Locking--Monitors">Internal
+ Locking--Monitors</a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="tutorial.html#boost_synchro.users_guide.tutorial.internal_locking__monitors.concurrent_threads_of_execution">Concurrent
+ threads of execution</a></span></dt>
+<dt><span class="section">Monitors</span></dt>
+</dl></div>
+<div class="note"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/html/images/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ This tutorial is an adaptation of chapter Concurrency of the Object-Oriented
+ Programming in the BETA Programming Language and of the paper of Andrei
+ Alexandrescu "Multithreading and the C++ Type System" to the
+ Boost library.
+ </p></td></tr>
+</table></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.users_guide.tutorial.internal_locking__monitors.concurrent_threads_of_execution"></a><a href="tutorial.html#boost_synchro.users_guide.tutorial.internal_locking__monitors.concurrent_threads_of_execution" title="Concurrent
+ threads of execution">Concurrent
+ threads of execution</a>
+</h5></div></div></div>
+<p>
+ Consider, for example, modeling a bank account class that supports simultaneous
+ deposits and withdrawals from multiple locations (arguably the "Hello,
+ World" of multithreaded programming).
+ </p>
+<p>
+ From here a component is a model of the <code class="computeroutput"><span class="identifier">Callable</span></code>
+ concept.
+ </p>
+<p>
+ On C++0X (Boost) concurrent execution of a component is obtained by means
+ of the <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">thread</span></code>(<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">thread</span></code>):
+ </p>
+<pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">thread</span> <span class="identifier">thread1</span><span class="special">(</span><span class="identifier">S</span><span class="special">);</span>
+</pre>
+<p>
+ where <code class="computeroutput"><span class="identifier">S</span></code> is a model of
+ <code class="computeroutput"><span class="identifier">Callable</span></code>. The meaning
+ of this expression is that execution of <code class="computeroutput"><span class="identifier">S</span><span class="special">()</span></code> will take place concurrently with the
+ current thread of execution executing the expression.
+ </p>
+<p>
+ The following example includes a bank account of a person (Joe) and two
+ components, one corresponding to a bank agent depositing money in Joe's
+ account, and one representing Joe. Joe will only be withdrawing money
+ from the account:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">BankAccount</span><span class="special">;</span>
+
+<span class="identifier">BankAccount</span> <span class="identifier">JoesAccount</span><span class="special">;</span>
+
+<span class="keyword">void</span> <span class="identifier">bankAgent</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="keyword">for</span> <span class="special">(</span><span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span><span class="number">10</span><span class="special">;</span> <span class="identifier">i</span><span class="special">&gt;</span><span class="number">0</span><span class="special">;</span> <span class="special">--</span><span class="identifier">i</span><span class="special">)</span> <span class="special">{</span>
+ <span class="comment">//...
+</span> <span class="identifier">JoesAccount</span><span class="special">.</span><span class="identifier">Deposit</span><span class="special">(</span><span class="number">500</span><span class="special">);</span>
+ <span class="comment">//...
+</span> <span class="special">}</span>
+<span class="special">}</span>
+
+<span class="keyword">void</span> <span class="identifier">Joe</span><span class="special">()</span> <span class="special">{</span>
+ <span class="keyword">for</span> <span class="special">(</span><span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span><span class="number">10</span><span class="special">;</span> <span class="identifier">i</span><span class="special">&gt;</span><span class="number">0</span><span class="special">;</span> <span class="special">--</span><span class="identifier">i</span><span class="special">)</span> <span class="special">{</span>
+ <span class="comment">//...
+</span> <span class="keyword">int</span> <span class="identifier">myPocket</span> <span class="special">=</span> <span class="identifier">JoesAccount</span><span class="special">.</span><span class="identifier">Withdraw</span><span class="special">(</span><span class="number">100</span><span class="special">);</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">myPocket</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="comment">//...
+</span> <span class="special">}</span>
+<span class="special">}</span>
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{</span>
+ <span class="comment">//...
+</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">thread</span> <span class="identifier">thread1</span><span class="special">(</span><span class="identifier">bankAgent</span><span class="special">);</span> <span class="comment">// start concurrent execution of bankAgent
+</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">thread</span> <span class="identifier">thread2</span><span class="special">(</span><span class="identifier">Joe</span><span class="special">);</span> <span class="comment">// start concurrent execution of Joe
+</span> <span class="identifier">thread1</span><span class="special">.</span><span class="identifier">join</span><span class="special">();</span>
+ <span class="identifier">thread2</span><span class="special">.</span><span class="identifier">join</span><span class="special">();</span>
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ From time to time, the <code class="computeroutput"><span class="identifier">bankAgent</span></code>
+ will deposit $500 in <code class="computeroutput"><span class="identifier">JoesAccount</span></code>.
+ Joe will similarly withdraw $100 from his account. These sentences describe
+ that the bankAgent and Joe are executed concurrently.
+ </p>
+<p>
+ The above example works well as long as the bankAgent and Joe do not
+ access JoesAccount at the same time. There is, however, no guarantee
+ that this will not happen. We may use a mutex to guarantee exclusive
+ access to each bank.
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">BankAccount</span> <span class="special">{</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">mutex</span> <span class="identifier">mtx_</span><span class="special">;</span>
+ <span class="keyword">int</span> <span class="identifier">balance_</span><span class="special">;</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">void</span> <span class="identifier">Deposit</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">amount</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">mtx_</span><span class="special">.</span><span class="identifier">lock</span><span class="special">();</span>
+ <span class="identifier">balance_</span> <span class="special">+=</span> <span class="identifier">amount</span><span class="special">;</span>
+ <span class="identifier">mtx_</span><span class="special">.</span><span class="identifier">unlock</span><span class="special">();</span>
+ <span class="special">}</span>
+ <span class="keyword">void</span> <span class="identifier">Withdraw</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">amount</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">mtx_</span><span class="special">.</span><span class="identifier">lock</span><span class="special">();</span>
+ <span class="identifier">balance_</span> <span class="special">-=</span> <span class="identifier">amount</span><span class="special">;</span>
+ <span class="identifier">mtx_</span><span class="special">.</span><span class="identifier">unlock</span><span class="special">();</span>
+ <span class="special">}</span>
+ <span class="keyword">int</span> <span class="identifier">GetBalance</span><span class="special">()</span> <span class="special">{</span>
+ <span class="identifier">mtx_</span><span class="special">.</span><span class="identifier">lock</span><span class="special">();</span>
+ <span class="keyword">int</span> <span class="identifier">b</span> <span class="special">=</span> <span class="identifier">balance_</span><span class="special">;</span>
+ <span class="identifier">mtx_</span><span class="special">.</span><span class="identifier">unlock</span><span class="special">();</span>
+ <span class="keyword">return</span> <span class="identifier">balance_</span><span class="special">;</span>
+ <span class="special">}</span>
+<span class="special">};</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Execution of the Deposit and Withdraw operations will no longer be able
+ to make simultaneous access to balance.
+ </p>
+<p>
+ Mutex is a simple and basic mechanism for obtaining synchronization.
+ In the above example it is relatively easy to be convinced that the synchronization
+ works correctly (in the absence of exception). In a system with several
+ concurrent objects and several shared objects, it may be difficult to
+ describe synchronization by means of mutexes. Programs that make heavy
+ use of mutexes may be difficult to read and write. Instead, we shall
+ introduce a number of generic classes for handling more complicated forms
+ of synchronization and communication.
+ </p>
+<p>
+ With the RAII idiom we can simplify a lot this using the scoped locks.
+ In the code below, guard's constructor locks the passed-in object this,
+ and guard's destructor unlocks this.
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">BankAccount</span> <span class="special">{</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">mutex</span> <span class="identifier">mtx_</span><span class="special">;</span> <span class="callout_bug"><a name="boost.synchro92co" href="tutorial.html#boost.synchro92"><img src="../../../../../../doc/src/images/callouts/1.png" alt="1" border="0"></a></span>
+ <span class="keyword">int</span> <span class="identifier">balance_</span><span class="special">;</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">void</span> <span class="identifier">Deposit</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">amount</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">lock_guard</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mutex</span><span class="special">&gt;</span> <span class="identifier">guard</span><span class="special">(</span><span class="identifier">mtx_</span><span class="special">);</span>
+ <span class="identifier">balance_</span> <span class="special">+=</span> <span class="identifier">amount</span><span class="special">;</span>
+ <span class="special">}</span>
+ <span class="keyword">void</span> <span class="identifier">Withdraw</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">amount</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">lock_guard</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mutex</span><span class="special">&gt;</span> <span class="identifier">guard</span><span class="special">(</span><span class="identifier">mtx_</span><span class="special">);</span>
+ <span class="identifier">balance_</span> <span class="special">-=</span> <span class="identifier">amount</span><span class="special">;</span>
+ <span class="special">}</span>
+ <span class="keyword">int</span> <span class="identifier">GetBalance</span><span class="special">()</span> <span class="special">{</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">lock_guard</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mutex</span><span class="special">&gt;</span> <span class="identifier">guard</span><span class="special">(</span><span class="identifier">mtx_</span><span class="special">);</span>
+ <span class="keyword">return</span> <span class="identifier">balance_</span><span class="special">;</span>
+ <span class="special">}</span>
+<span class="special">};</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ </p>
+<div class="calloutlist"><table border="0" summary="Callout list"><tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro92"></a>1 </td>
+<td valign="top" align="left"><p> explicit mutex declaration </p></td>
+</tr></table></div>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ The object-level locking idiom doesn't cover the entire richness of a
+ threading model. For example, the model above is quite deadlock-prone
+ when you try to coordinate multi-object transactions. Nonetheless, object-level
+ locking is useful in many cases, and in combination with other mechanisms
+ can provide a satisfactory solution to many threaded access problems
+ in object-oriented programs.
+ </p>
+<p>
+ The BankAccount class above uses internal locking. Basically, a class
+ that uses internal locking guarantees that any concurrent calls to its
+ public member functions don't corrupt an instance of that class. This
+ is typically ensured by having each public member function acquire a
+ lock on the object upon entry. This way, for any given object of that
+ class, there can be only one member function call active at any moment,
+ so the operations are nicely serialized.
+ </p>
+<p>
+ This approach is reasonably easy to implement and has an attractive simplicity.
+ Unfortunately, "simple" might sometimes morph into "simplistic."
+ </p>
+<p>
+ Internal locking is insufficient for many real-world synchronization
+ tasks. Imagine that you want to implement an ATM withdrawal transaction
+ with the BankAccount class. The requirements are simple. The ATM transaction
+ consists of two withdrawals-one for the actual money and one for the
+ $2 commission. The two withdrawals must appear in strict sequence; that
+ is, no other transaction can exist between them.
+ </p>
+<p>
+ The obvious implementation is erratic:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">ATMWithdrawal</span><span class="special">(</span><span class="identifier">BankAccount</span><span class="special">&amp;</span> <span class="identifier">acct</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">sum</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">acct</span><span class="special">.</span><span class="identifier">Withdraw</span><span class="special">(</span><span class="identifier">sum</span><span class="special">);</span>
+ <span class="callout_bug"><a name="boost.synchro93co" href="tutorial.html#boost.synchro93"><img src="../../../../../../doc/src/images/callouts/1.png" alt="1" border="0"></a></span>
+ <span class="identifier">acct</span><span class="special">.</span><span class="identifier">Withdraw</span><span class="special">(</span><span class="number">2</span><span class="special">);</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ </p>
+<div class="calloutlist"><table border="0" summary="Callout list"><tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro93"></a>1 </td>
+<td valign="top" align="left"><p>preemption possible</p></td>
+</tr></table></div>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ The problem is that between the two calls above, another thread can perform
+ another operation on the account, thus breaking the second design requirement.
+ </p>
+<p>
+ In an attempt to solve this problem, let's lock the account from the
+ outside during the two operations:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">ATMWithdrawal</span><span class="special">(</span><span class="identifier">BankAccount</span><span class="special">&amp;</span> <span class="identifier">acct</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">sum</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">lock_guard</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mutex</span><span class="special">&gt;</span> <span class="identifier">guard</span><span class="special">(</span><span class="identifier">acct</span><span class="special">.</span><span class="identifier">mtx_</span><span class="special">);</span> <span class="callout_bug"><a name="boost.synchro94co" href="tutorial.html#boost.synchro94"><img src="../../../../../../doc/src/images/callouts/1.png" alt="1" border="0"></a></span>
+ <span class="identifier">acct</span><span class="special">.</span><span class="identifier">Withdraw</span><span class="special">(</span><span class="identifier">sum</span><span class="special">);</span>
+ <span class="identifier">acct</span><span class="special">.</span><span class="identifier">Withdraw</span><span class="special">(</span><span class="number">2</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ </p>
+<div class="calloutlist"><table border="0" summary="Callout list"><tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro94"></a>1 </td>
+<td valign="top" align="left"><p>mtx_ field is private</p></td>
+</tr></table></div>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Notice that the code above do not compiles, the <code class="computeroutput"><span class="identifier">mtx_</span></code>
+ field is private. We have two possibilities:
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ make <code class="computeroutput"><span class="identifier">mtx_</span></code> public which
+ seams odd
+ </li>
+<li>
+ make the <code class="computeroutput"><span class="identifier">BankAccount</span></code>
+ lockable by adding the lock/unlock functions
+ </li>
+</ul></div>
+<p>
+ We can add these functions explicitly
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">BankAccount</span> <span class="special">{</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">mutex</span> <span class="identifier">mtx_</span><span class="special">;</span>
+ <span class="keyword">int</span> <span class="identifier">balance_</span><span class="special">;</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">void</span> <span class="identifier">Deposit</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">amount</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">lock_guard</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mutex</span><span class="special">&gt;</span> <span class="identifier">guard</span><span class="special">(</span><span class="identifier">mtx_</span><span class="special">);</span>
+ <span class="identifier">balance_</span> <span class="special">+=</span> <span class="identifier">amount</span><span class="special">;</span>
+ <span class="special">}</span>
+ <span class="keyword">void</span> <span class="identifier">Withdraw</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">amount</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">lock_guard</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mutex</span><span class="special">&gt;</span> <span class="identifier">guard</span><span class="special">(</span><span class="identifier">mtx_</span><span class="special">);</span>
+ <span class="identifier">balance_</span> <span class="special">-=</span> <span class="identifier">amount</span><span class="special">;</span>
+ <span class="special">}</span>
+ <span class="keyword">void</span> <span class="identifier">lock</span><span class="special">()</span> <span class="special">{</span>
+ <span class="identifier">mtx_</span><span class="special">.</span><span class="identifier">lock</span><span class="special">();</span>
+ <span class="special">}</span>
+ <span class="keyword">void</span> <span class="identifier">unlock</span><span class="special">()</span> <span class="special">{</span>
+ <span class="identifier">mtx_</span><span class="special">.</span><span class="identifier">unlock</span><span class="special">();</span>
+ <span class="special">}</span>
+<span class="special">};</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ or inheriting from a class which add these lockable functions.
+ </p>
+<p>
+ The <code class="computeroutput"><span class="identifier">exclusive_lockable_adapter</span></code>
+ class
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">exclusive_lockable_adapter</span>
+<span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">Lockable</span> <span class="identifier">lockable_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">scope_tag</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">scope</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">category_tag</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">category</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">reentrancy_tag</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">reentrancy</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">timed_interface_tag</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">timed_interface</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">lifetime_tag</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">lifetime</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">naming_tag</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">naming</span><span class="special">;</span>
+
+ <span class="identifier">BOOST_COPY_CONSTRUCTOR_DELETE</span><span class="special">(</span><span class="identifier">exclusive_lockable_adapter</span><span class="special">)</span> <span class="callout_bug"><a name="boost.synchro0co" href="tutorial.html#boost.synchro0"><img src="../../../../../../doc/src/images/callouts/1.png" alt="1" border="0"></a></span>
+ <span class="identifier">BOOST_COPY_ASSIGNEMENT_DELETE</span><span class="special">(</span><span class="identifier">exclusive_lockable_adapter</span><span class="special">)</span> <span class="callout_bug"><a name="boost.synchro1co" href="tutorial.html#boost.synchro1"><img src="../../../../../../doc/src/images/callouts/2.png" alt="2" border="0"></a></span>
+ <span class="identifier">exclusive_lockable_adapter</span><span class="special">()</span> <span class="special">{}</span>
+ <span class="keyword">void</span> <span class="identifier">lock</span><span class="special">()</span> <span class="special">{</span><span class="identifier">lock_</span><span class="special">.</span><span class="identifier">lock</span><span class="special">();}</span>
+ <span class="keyword">void</span> <span class="identifier">unlock</span><span class="special">()</span> <span class="special">{</span><span class="identifier">lock_</span><span class="special">.</span><span class="identifier">unlock</span><span class="special">();}</span>
+ <span class="keyword">bool</span> <span class="identifier">try_lock</span><span class="special">()</span> <span class="special">{</span> <span class="keyword">return</span> <span class="identifier">lock_</span><span class="special">.</span><span class="identifier">try_lock</span><span class="special">();}</span>
+
+<span class="keyword">protected</span><span class="special">:</span>
+ <span class="identifier">lockable_type</span><span class="special">*</span> <span class="identifier">mutex</span><span class="special">()</span> <span class="keyword">const</span> <span class="special">{</span> <span class="keyword">return</span> <span class="special">&amp;</span><span class="identifier">lock_</span><span class="special">;</span> <span class="special">}</span>
+ <span class="keyword">mutable</span> <span class="identifier">Lockable</span> <span class="identifier">lock_</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ </p>
+<div class="calloutlist"><table border="0" summary="Callout list">
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro0"></a>1 </td>
+<td valign="top" align="left"><p> disable copy construction </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro1"></a>2 </td>
+<td valign="top" align="left"><p> disable copy asignement </p></td>
+</tr>
+</table></div>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ The <code class="computeroutput"><span class="identifier">BankAccount</span></code> class
+ result now in
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">BankAccount</span>
+<span class="special">:</span> <span class="keyword">public</span> <span class="identifier">exclusive_lockable_adapter</span><span class="special">&lt;</span><span class="identifier">thread_mutex</span><span class="special">&gt;</span>
+<span class="special">{</span>
+ <span class="keyword">int</span> <span class="identifier">balance_</span><span class="special">;</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">void</span> <span class="identifier">Deposit</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">amount</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">lock_guard</span><span class="special">&lt;</span><span class="identifier">BankAccount</span><span class="special">&gt;</span> <span class="identifier">guard</span><span class="special">(*</span><span class="keyword">this</span><span class="special">);</span>
+<span class="comment">// boost::lock_guard&lt;boost::mutex&gt; guard(*this-&gt;mutex());
+</span> <span class="identifier">balance_</span> <span class="special">+=</span> <span class="identifier">amount</span><span class="special">;</span>
+ <span class="special">}</span>
+ <span class="keyword">void</span> <span class="identifier">Withdraw</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">amount</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">lock_guard</span><span class="special">&lt;</span><span class="identifier">BankAccount</span><span class="special">&gt;</span> <span class="identifier">guard</span><span class="special">(*</span><span class="keyword">this</span><span class="special">);</span>
+<span class="comment">// boost::lock_guard&lt;boost::mutex&gt; guard(*this-&gt;mutex());
+</span> <span class="identifier">balance_</span> <span class="special">-=</span> <span class="identifier">amount</span><span class="special">;</span>
+ <span class="special">}</span>
+ <span class="keyword">int</span> <span class="identifier">GetBalance</span><span class="special">()</span> <span class="special">{</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">lock_guard</span><span class="special">&lt;</span><span class="identifier">BankAccount</span><span class="special">&gt;</span> <span class="identifier">guard</span><span class="special">(*</span><span class="keyword">this</span><span class="special">);</span>
+<span class="comment">// boost::lock_guard&lt;boost::mutex&gt; guard(*this-&gt;mutex());
+</span> <span class="keyword">return</span> <span class="identifier">balance_</span><span class="special">;</span>
+ <span class="special">}</span>
+<span class="special">};</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ and the code that do not comiles becomes
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">ATMWithdrawal</span><span class="special">(</span><span class="identifier">BankAccount</span><span class="special">&amp;</span> <span class="identifier">acct</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">sum</span><span class="special">)</span> <span class="special">{</span>
+<span class="comment">// boost::lock_guard&lt;boost::mutex&gt; guard(*acct.mutex());
+</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">lock_guard</span><span class="special">&lt;</span><span class="identifier">BankAccount</span><span class="special">&gt;</span> <span class="identifier">guard</span><span class="special">(</span><span class="identifier">acct</span><span class="special">);</span>
+ <span class="identifier">acct</span><span class="special">.</span><span class="identifier">Withdraw</span><span class="special">(</span><span class="identifier">sum</span><span class="special">);</span>
+ <span class="identifier">acct</span><span class="special">.</span><span class="identifier">Withdraw</span><span class="special">(</span><span class="number">2</span><span class="special">);</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Notice that now acct is being locked by Withdraw after it has already
+ been locked by guard. When running such code, one of two things happens.
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ Your mutex implementation might support the so-called recursive mutex
+ semantics. This means that the same thread can lock the same mutex
+ several times successfully. In this case, the implementation works
+ but has a performance overhead due to unnecessary locking. (The locking/unlocking
+ sequence in the two Withdraw calls is not needed but performed anyway-and
+ that costs time.)
+ </li>
+<li>
+ Your mutex implementation might not support recursive locking, which
+ means that as soon as you try to acquire it the second time, it blocks-so
+ the ATMWithdrawal function enters the dreaded deadlock.
+ </li>
+</ul></div>
+<p>
+ As <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mutex</span></code> is not recursive, we need to
+ use its recursive version <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">recursive_mutex</span></code>.
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">BankAccount</span>
+<span class="special">:</span> <span class="keyword">public</span> <span class="identifier">exclusive_lockable_adapter</span><span class="special">&lt;</span><span class="identifier">thread_recursive_mutex</span><span class="special">&gt;</span>
+<span class="special">{</span>
+
+ <span class="comment">// ...
+</span><span class="special">};</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.users_guide.tutorial.internal_locking__monitors.monitors"></a>Monitors
+</h5></div></div></div>
+<div class="toc"><dl><dt><span class="section"><a href="tutorial.html#boost_synchro.users_guide.tutorial.internal_locking__monitors.monitors.monitor_conditions">Monitor
+ Conditions</a></span></dt></dl></div>
+<p>
+ The use of <code class="computeroutput"><span class="identifier">mutex</span></code> and
+ <code class="computeroutput"><span class="identifier">lockers</span></code>, as in <code class="computeroutput"><span class="identifier">BankAccount</span></code>, is a common way of defining
+ objects shared by two or more concurrent components. The exclusive_lockable_adapter
+ class was a first step. We shall therefore introduce an abstraction that
+ makes it easier to define such objects. The following class describes
+ a so-called monitor pattern.
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">=</span><span class="identifier">thread_mutex</span>
+<span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">exclusive_monitor</span> <span class="special">:</span> <span class="keyword">protected</span> <span class="identifier">exclusive_lockable_adapter</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="special">{</span> <span class="callout_bug"><a name="boost.synchro2co" href="tutorial.html#boost.synchro2"><img src="../../../../../../doc/src/images/callouts/1.png" alt="1" border="0"></a></span>
+<span class="keyword">protected</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">unspecified</span> <span class="identifier">synchronizer</span><span class="special">;</span> <span class="callout_bug"><a name="boost.synchro3co" href="tutorial.html#boost.synchro3"><img src="../../../../../../doc/src/images/callouts/2.png" alt="2" border="0"></a></span>
+<span class="special">};</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ </p>
+<div class="calloutlist"><table border="0" summary="Callout list">
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro2"></a>1 </td>
+<td valign="top" align="left"><p> behaves like an ExclusiveLockable for the derived classes </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro3"></a>2 </td>
+<td valign="top" align="left"><p> is an strict
+ lock guard </p></td>
+</tr>
+</table></div>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ A monitor object behaves like a <code class="computeroutput"><span class="identifier">ExclusiveLockable</span></code>
+ object but only for the inheriting classes. Protected inheritance from
+ exclusive_lockable_adapter provide to all the derived classes all ExclusiveLockable
+ operations. In addition has a protected nested class, synchronizer, used
+ when defining the monitor operations to synchronize the access critical
+ regions. The BankAccount may be described using Monitor in the following
+ way:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">BankAccount</span> <span class="special">:</span> <span class="keyword">protected</span> <span class="identifier">exclusive_monitor</span><span class="special">&lt;&gt;</span>
+<span class="special">{</span>
+<span class="keyword">protected</span><span class="special">:</span>
+ <span class="keyword">int</span> <span class="identifier">balance_</span><span class="special">;</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="identifier">BankAccount</span><span class="special">()</span> <span class="special">:</span> <span class="identifier">balance_</span><span class="special">(</span><span class="number">0</span><span class="special">)</span> <span class="special">{}</span>
+ <span class="identifier">BankAccount</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">BankAccount</span> <span class="special">&amp;</span><span class="identifier">rhs</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">synchronizer</span> <span class="identifier">_</span><span class="special">(*</span><span class="identifier">rhs</span><span class="special">.</span><span class="identifier">mutex</span><span class="special">());</span>
+ <span class="identifier">balance_</span><span class="special">=</span><span class="identifier">rhs</span><span class="special">.</span><span class="identifier">balance_</span><span class="special">;</span>
+ <span class="special">}</span>
+
+ <span class="identifier">BankAccount</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span><span class="identifier">BankAccount</span> <span class="special">&amp;</span><span class="identifier">rhs</span><span class="special">)</span>
+ <span class="special">{</span>
+ <span class="keyword">if</span><span class="special">(&amp;</span><span class="identifier">rhs</span> <span class="special">==</span> <span class="keyword">this</span><span class="special">)</span> <span class="keyword">return</span> <span class="special">*</span><span class="keyword">this</span><span class="special">;</span>
+
+ <span class="keyword">int</span> <span class="identifier">balance</span><span class="special">=</span><span class="number">0</span><span class="special">;</span>
+ <span class="special">{</span>
+ <span class="identifier">synchronizer</span> <span class="identifier">_</span><span class="special">(*</span><span class="identifier">rhs</span><span class="special">.</span><span class="identifier">mutex</span><span class="special">());</span>
+ <span class="identifier">balance</span><span class="special">=</span><span class="identifier">rhs</span><span class="special">.</span><span class="identifier">balance_</span><span class="special">;</span>
+ <span class="special">}</span>
+ <span class="identifier">synchronizer</span> <span class="identifier">_</span><span class="special">(*</span><span class="keyword">this</span><span class="special">-&gt;</span><span class="identifier">mutex</span><span class="special">());</span>
+ <span class="identifier">balance_</span><span class="special">=</span><span class="identifier">balance</span><span class="special">;</span>
+ <span class="keyword">return</span> <span class="special">*</span><span class="keyword">this</span><span class="special">;</span>
+ <span class="special">}</span>
+<span class="preprocessor">#if</span> <span class="number">0</span>
+ <span class="identifier">BankAccount</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span><span class="identifier">BankAccount</span> <span class="special">&amp;</span><span class="identifier">rhs</span><span class="special">)</span>
+ <span class="special">{</span>
+ <span class="keyword">if</span><span class="special">(&amp;</span><span class="identifier">rhs</span> <span class="special">==</span> <span class="keyword">this</span><span class="special">)</span> <span class="keyword">return</span> <span class="special">*</span><span class="keyword">this</span><span class="special">;</span>
+ <span class="keyword">int</span> <span class="identifier">balance</span><span class="special">=</span><span class="number">0</span><span class="special">;</span>
+ <span class="identifier">synchronize</span> <span class="special">(*</span><span class="identifier">rhs</span><span class="special">.</span><span class="identifier">mutex</span><span class="special">())</span> <span class="identifier">balance</span><span class="special">=</span><span class="identifier">rhs</span><span class="special">.</span><span class="identifier">balance_</span><span class="special">;</span>
+ <span class="identifier">synchronize</span> <span class="special">(*</span><span class="keyword">this</span><span class="special">-&gt;</span><span class="identifier">mutex</span><span class="special">())</span> <span class="identifier">balance_</span><span class="special">=</span><span class="identifier">balance</span><span class="special">;</span>
+ <span class="keyword">return</span> <span class="special">*</span><span class="keyword">this</span><span class="special">;</span>
+ <span class="special">}</span>
+<span class="preprocessor">#endif</span>
+
+ <span class="keyword">void</span> <span class="identifier">Deposit</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">amount</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">synchronizer</span> <span class="identifier">_</span><span class="special">(*</span><span class="keyword">this</span><span class="special">-&gt;</span><span class="identifier">mutex</span><span class="special">());</span>
+ <span class="identifier">balance_</span> <span class="special">+=</span> <span class="identifier">amount</span><span class="special">;</span>
+ <span class="special">}</span>
+ <span class="keyword">int</span> <span class="identifier">Withdraw</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">amount</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">synchronizer</span> <span class="identifier">_</span><span class="special">(*</span><span class="keyword">this</span><span class="special">-&gt;</span><span class="identifier">mutex</span><span class="special">());</span>
+ <span class="identifier">balance_</span> <span class="special">-=</span> <span class="identifier">amount</span><span class="special">;</span>
+ <span class="keyword">return</span> <span class="identifier">amount</span><span class="special">;</span>
+ <span class="special">}</span>
+ <span class="keyword">int</span> <span class="identifier">GetBalance</span><span class="special">()</span> <span class="special">{</span>
+ <span class="identifier">synchronizer</span> <span class="identifier">_</span><span class="special">(*</span><span class="keyword">this</span><span class="special">-&gt;</span><span class="identifier">mutex</span><span class="special">());</span>
+ <span class="keyword">return</span> <span class="identifier">balance_</span><span class="special">;</span>
+ <span class="special">}</span>
+<span class="special">};</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ In the following, a monitor means some sub-class of monitor. A synchroronized
+ operation means an operation using the synchronizer guard defined within
+ some monitor. Monitor is one example of a high-level concurrency abstraction
+ that can be defined by means of mutexes.
+ </p>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h6 class="title">
+<a name="boost_synchro.users_guide.tutorial.internal_locking__monitors.monitors.monitor_conditions"></a><a href="tutorial.html#boost_synchro.users_guide.tutorial.internal_locking__monitors.monitors.monitor_conditions" title="Monitor
+ Conditions">Monitor
+ Conditions</a>
+</h6></div></div></div>
+<p>
+ It may happen that a component executing an entry operation of a monitor
+ is unable to continue execution due to some condition not being fulfilled.
+ Consider, for instance, a bounded buffer of characters. Such a buffer
+ may be implemented as a monitor with two operations Push and Pull:
+ the Puss operation cannot be executed if the buffer is full, and the
+ Pull operation cannot be executed if the buffer is empty. A sketch
+ of such a buffer monitor may look as follows:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">sync_buffer</span> <span class="special">{</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">mutex</span> <span class="identifier">mtx_</span><span class="special">;</span> <span class="callout_bug"><a name="boost.synchro70co" href="tutorial.html#boost.synchro70"><img src="../../../../../../doc/src/images/callouts/1.png" alt="1" border="0"></a></span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="special">...</span>
+ <span class="keyword">bool</span> <span class="identifier">full</span><span class="special">()</span> <span class="special">{</span> <span class="keyword">return</span> <span class="identifier">in_</span><span class="special">==</span><span class="identifier">out_</span><span class="special">;</span> <span class="special">}</span>
+ <span class="keyword">bool</span> <span class="identifier">empty</span><span class="special">()</span> <span class="special">{</span> <span class="keyword">return</span> <span class="identifier">in_</span><span class="special">==(</span><span class="identifier">out_</span><span class="special">%</span><span class="identifier">size</span><span class="special">)+</span><span class="number">1</span><span class="special">;</span> <span class="special">}</span>
+ <span class="keyword">void</span> <span class="identifier">push</span><span class="special">(</span><span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">v</span><span class="special">)</span> <span class="special">{</span>
+ <span class="comment">// wait if buffer is full
+</span> <span class="identifier">data_</span><span class="special">[</span><span class="identifier">in_</span><span class="special">]=</span><span class="identifier">v</span><span class="special">;</span>
+ <span class="identifier">in_</span> <span class="special">=</span> <span class="special">(</span><span class="identifier">in_</span><span class="special">%</span> <span class="identifier">size</span><span class="special">)+</span><span class="number">1</span><span class="special">;</span>
+ <span class="special">}</span>
+ <span class="identifier">T</span> <span class="identifier">pull</span><span class="special">()</span> <span class="special">{</span>
+ <span class="comment">// wait if buffer is empty
+</span> <span class="identifier">out_</span> <span class="special">=</span> <span class="special">(</span><span class="identifier">out_</span><span class="special">%</span> <span class="identifier">size</span><span class="special">)+</span><span class="number">1</span><span class="special">;</span>
+ <span class="keyword">return</span> <span class="identifier">data_</span><span class="special">[</span><span class="identifier">out_</span><span class="special">];</span>
+ <span class="special">}</span>
+<span class="special">};</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ </p>
+<div class="calloutlist"><table border="0" summary="Callout list"><tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro70"></a>1 </td>
+<td valign="top" align="left"><p> explicit mutex declaration </p></td>
+</tr></table></div>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ The meaning of a wait is that the calling component is delayed until
+ the condition becomes true. We can do that using Boost.Thread condition
+ variables like:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="identifier">size</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">sync_buffer</span>
+<span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">mutex</span> <span class="identifier">mutex_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">condition_variable</span> <span class="identifier">condition_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">unique_lock</span><span class="special">&lt;</span><span class="identifier">mutex_type</span><span class="special">&gt;</span> <span class="identifier">unique_lock_type</span><span class="special">;</span>
+ <span class="identifier">mutex_type</span> <span class="identifier">mtx_</span><span class="special">;</span>
+ <span class="identifier">condition_type</span> <span class="identifier">not_full_</span><span class="special">;</span>
+ <span class="identifier">condition_type</span> <span class="identifier">not_empty_</span><span class="special">;</span>
+
+ <span class="identifier">T</span> <span class="identifier">data_</span><span class="special">[</span><span class="identifier">size</span><span class="special">+</span><span class="number">1</span><span class="special">];</span>
+ <span class="keyword">unsigned</span> <span class="identifier">in_</span><span class="special">,</span> <span class="identifier">out_</span><span class="special">;</span>
+
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="identifier">sync_buffer</span><span class="special">():</span><span class="identifier">in_</span><span class="special">(</span><span class="number">0</span><span class="special">),</span> <span class="identifier">out_</span><span class="special">(</span><span class="number">0</span><span class="special">)</span> <span class="special">{}</span>
+
+ <span class="keyword">bool</span> <span class="identifier">full</span><span class="special">()</span> <span class="special">{</span> <span class="keyword">return</span> <span class="identifier">out_</span><span class="special">==(</span><span class="identifier">in_</span><span class="special">+</span><span class="number">1</span><span class="special">)%(</span><span class="identifier">size</span><span class="special">+</span><span class="number">1</span><span class="special">);</span> <span class="special">}</span>
+ <span class="keyword">bool</span> <span class="identifier">empty</span><span class="special">()</span> <span class="special">{</span> <span class="keyword">return</span> <span class="identifier">out_</span><span class="special">==</span><span class="identifier">in_</span><span class="special">;</span> <span class="special">}</span>
+
+ <span class="keyword">unsigned</span> <span class="identifier">get_in</span><span class="special">()</span> <span class="special">{</span><span class="keyword">return</span> <span class="identifier">in_</span><span class="special">;}</span>
+ <span class="keyword">unsigned</span> <span class="identifier">get_out</span><span class="special">()</span> <span class="special">{</span><span class="keyword">return</span> <span class="identifier">out_</span><span class="special">;}</span>
+ <span class="keyword">void</span> <span class="identifier">push</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">v</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">unique_lock_type</span> <span class="identifier">guard</span><span class="special">(</span><span class="identifier">mtx_</span><span class="special">);</span> <span class="callout_bug"><a name="boost.synchro77co" href="tutorial.html#boost.synchro77"><img src="../../../../../../doc/src/images/callouts/1.png" alt="1" border="0"></a></span>
+ <span class="keyword">while</span> <span class="special">(</span><span class="identifier">full</span><span class="special">())</span> <span class="special">{</span> <span class="callout_bug"><a name="boost.synchro78co" href="tutorial.html#boost.synchro78"><img src="../../../../../../doc/src/images/callouts/2.png" alt="2" border="0"></a></span>
+ <span class="identifier">not_full_</span><span class="special">.</span><span class="identifier">wait</span><span class="special">(</span><span class="identifier">guard</span><span class="special">);</span>
+ <span class="special">}</span>
+ <span class="identifier">data_</span><span class="special">[</span><span class="identifier">in_</span><span class="special">]=</span><span class="identifier">v</span><span class="special">;</span>
+ <span class="identifier">in_</span> <span class="special">=</span> <span class="special">(</span><span class="identifier">in_</span><span class="special">+</span><span class="number">1</span><span class="special">)%</span> <span class="special">(</span><span class="identifier">size</span><span class="special">+</span><span class="number">1</span><span class="special">);</span>
+ <span class="identifier">not_empty_</span><span class="special">.</span><span class="identifier">notify_one</span><span class="special">();</span> <span class="callout_bug"><a name="boost.synchro79co" href="tutorial.html#boost.synchro79"><img src="../../../../../../doc/src/images/callouts/3.png" alt="3" border="0"></a></span>
+ <span class="special">}</span>
+
+ <span class="identifier">T</span> <span class="identifier">pull</span><span class="special">()</span> <span class="special">{</span>
+ <span class="identifier">unique_lock_type</span> <span class="identifier">guard</span><span class="special">(</span><span class="identifier">mtx_</span><span class="special">);</span> <span class="callout_bug"><a name="boost.synchro80co" href="tutorial.html#boost.synchro80"><img src="../../../../../../doc/src/images/callouts/4.png" alt="4" border="0"></a></span>
+ <span class="keyword">while</span> <span class="special">(</span><span class="identifier">empty</span><span class="special">())</span> <span class="special">{</span> <span class="callout_bug"><a name="boost.synchro81co" href="tutorial.html#boost.synchro81"><img src="../../../../../../doc/src/images/callouts/5.png" alt="5" border="0"></a></span>
+ <span class="identifier">not_empty_</span><span class="special">.</span><span class="identifier">wait</span><span class="special">(</span><span class="identifier">guard</span><span class="special">);</span>
+ <span class="special">}</span>
+ <span class="keyword">unsigned</span> <span class="identifier">idx</span> <span class="special">=</span> <span class="identifier">out_</span><span class="special">;</span>
+ <span class="identifier">out_</span> <span class="special">=</span> <span class="special">(</span><span class="identifier">out_</span><span class="special">+</span><span class="number">1</span><span class="special">)%</span> <span class="special">(</span><span class="identifier">size</span><span class="special">+</span><span class="number">1</span><span class="special">);</span>
+ <span class="identifier">not_full_</span><span class="special">.</span><span class="identifier">notify_one</span><span class="special">();</span> <span class="callout_bug"><a name="boost.synchro82co" href="tutorial.html#boost.synchro82"><img src="../../../../../../doc/src/images/callouts/6.png" alt="6" border="0"></a></span>
+ <span class="keyword">return</span> <span class="identifier">data_</span><span class="special">[</span><span class="identifier">idx</span><span class="special">];</span>
+ <span class="special">}</span>
+<span class="special">};</span>
+
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ </p>
+<div class="calloutlist"><table border="0" summary="Callout list">
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro77"></a>1 </td>
+<td valign="top" align="left"><p> ensure the mutex is locked!!! </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro78"></a>2 </td>
+<td valign="top" align="left"><p> loop until not full!!! </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro79"></a>3 </td>
+<td valign="top" align="left"><p> notifies a not_empty
+ condition </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro80"></a>4 </td>
+<td valign="top" align="left"><p> ensure the mutex is locked!!! </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro81"></a>5 </td>
+<td valign="top" align="left"><p> loop until not full!!! </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro82"></a>6 </td>
+<td valign="top" align="left"><p> notifies
+ a not_full condition </p></td>
+</tr>
+</table></div>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ The Monitor class replace the nested synchronizer unique_lock with
+ the class <code class="computeroutput"><span class="identifier">condition_locker</span></code>
+ for this purpose:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">Condition</span><span class="special">=</span><span class="identifier">condition_safe</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">best_condition</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="special">&gt;</span>
+ <span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">ScopeTag</span><span class="special">=</span><span class="keyword">typename</span> <span class="identifier">scope_tag</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">type</span>
+<span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">condition_unique_locker</span>
+ <span class="special">:</span> <span class="keyword">protected</span> <span class="identifier">unique_locker</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">,</span><span class="identifier">ScopeTag</span><span class="special">&gt;</span>
+<span class="special">{</span>
+ <span class="identifier">BOOST_CONCEPT_ASSERT</span><span class="special">((</span><span class="identifier">LockableConcept</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;));</span>
+ <span class="keyword">typedef</span> <span class="identifier">unique_locker</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">,</span> <span class="identifier">ScopeTag</span><span class="special">&gt;</span> <span class="identifier">super_type</span><span class="special">;</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">Lockable</span> <span class="identifier">lockable_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">Condition</span> <span class="identifier">condition</span><span class="special">;</span>
+
+ <span class="keyword">explicit</span> <span class="identifier">condition_unique_locker</span><span class="special">(</span><span class="identifier">lockable_type</span><span class="special">&amp;</span> <span class="identifier">obj</span><span class="special">);</span> <span class="callout_bug"><a name="boost.synchro4co" href="tutorial.html#boost.synchro4"><img src="../../../../../../doc/src/images/callouts/1.png" alt="1" border="0"></a></span>
+ <span class="identifier">condition_unique_locker</span><span class="special">(</span><span class="identifier">lockable_type</span><span class="special">&amp;</span> <span class="identifier">obj</span><span class="special">,</span> <span class="identifier">condition</span> <span class="special">&amp;</span><span class="identifier">cond</span><span class="special">);</span> <span class="callout_bug"><a name="boost.synchro5co" href="tutorial.html#boost.synchro5"><img src="../../../../../../doc/src/images/callouts/2.png" alt="2" border="0"></a></span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Predicate</span><span class="special">&gt;</span>
+ <span class="identifier">condition_unique_locker</span><span class="special">(</span><span class="identifier">lockable_type</span><span class="special">&amp;</span> <span class="identifier">obj</span><span class="special">,</span> <span class="identifier">condition</span> <span class="special">&amp;</span><span class="identifier">cond</span><span class="special">,</span> <span class="identifier">Predicate</span> <span class="identifier">pred</span><span class="special">);</span> <span class="callout_bug"><a name="boost.synchro6co" href="tutorial.html#boost.synchro6"><img src="../../../../../../doc/src/images/callouts/3.png" alt="3" border="0"></a></span>
+ <span class="special">~</span><span class="identifier">condition_unique_locker</span><span class="special">()</span> <span class="callout_bug"><a name="boost.synchro7co" href="tutorial.html#boost.synchro7"><img src="../../../../../../doc/src/images/callouts/4.png" alt="4" border="0"></a></span>
+
+ <span class="keyword">typedef</span> <span class="keyword">bool</span> <span class="special">(</span><span class="identifier">condition_unique_locker</span><span class="special">::*</span><span class="identifier">bool_type</span><span class="special">)()</span> <span class="keyword">const</span><span class="special">;</span> <span class="callout_bug"><a name="boost.synchro8co" href="tutorial.html#boost.synchro8"><img src="../../../../../../doc/src/images/callouts/5.png" alt="5" border="0"></a></span>
+ <span class="keyword">operator</span> <span class="identifier">bool_type</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span> <span class="callout_bug"><a name="boost.synchro9co" href="tutorial.html#boost.synchro9"><img src="../../../../../../doc/src/images/callouts/6.png" alt="6" border="0"></a></span>
+ <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">!()</span> <span class="keyword">const</span> <span class="special">{</span> <span class="keyword">return</span> <span class="keyword">false</span><span class="special">;</span> <span class="special">}</span> <span class="callout_bug"><a name="boost.synchro10co" href="tutorial.html#boost.synchro10"><img src="../../../../../../doc/src/images/callouts/7.png" alt="7" border="0"></a></span>
+ <span class="keyword">bool</span> <span class="identifier">owns_lock</span><span class="special">()</span> <span class="keyword">const</span> <span class="special">{</span> <span class="keyword">return</span> <span class="keyword">true</span><span class="special">;</span> <span class="special">}</span> <span class="callout_bug"><a name="boost.synchro11co" href="tutorial.html#boost.synchro11"><img src="../../../../../../doc/src/images/callouts/8.png" alt="8" border="0"></a></span>
+ <span class="keyword">bool</span> <span class="identifier">is_locking</span><span class="special">(</span><span class="identifier">lockable_type</span><span class="special">*</span> <span class="identifier">l</span><span class="special">)</span> <span class="keyword">const</span> <span class="callout_bug"><a name="boost.synchro12co" href="tutorial.html#boost.synchro12"><img src="../../../../../../doc/src/images/callouts/9.png" alt="9" border="0"></a></span>
+
+ <span class="keyword">void</span> <span class="identifier">relock_on</span><span class="special">(</span><span class="identifier">condition</span> <span class="special">&amp;</span> <span class="identifier">cond</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Duration</span><span class="special">&gt;</span>
+ <span class="keyword">void</span> <span class="identifier">relock_until</span><span class="special">(</span><span class="identifier">condition</span> <span class="special">&amp;</span> <span class="identifier">cond</span><span class="special">,</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">abs_time</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">duration_type</span><span class="special">&gt;</span>
+ <span class="keyword">void</span> <span class="identifier">relock_on_for</span><span class="special">(</span><span class="identifier">condition</span> <span class="special">&amp;</span> <span class="identifier">cond</span><span class="special">,</span> <span class="identifier">duration_type</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">rel_time</span><span class="special">);</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Predicate</span><span class="special">&gt;</span>
+ <span class="keyword">void</span> <span class="identifier">relock_when</span><span class="special">(</span><span class="identifier">condition</span> <span class="special">&amp;</span><span class="identifier">cond</span><span class="special">,</span> <span class="identifier">Predicate</span> <span class="identifier">pred</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Predicate</span><span class="special">&gt;</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Duration</span><span class="special">&gt;</span>
+ <span class="keyword">void</span> <span class="identifier">relock_when_until</span><span class="special">(</span><span class="identifier">condition</span> <span class="special">&amp;</span><span class="identifier">cond</span><span class="special">,</span> <span class="identifier">Predicate</span> <span class="identifier">pred</span><span class="special">,</span>
+ <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">abs_time</span><span class="special">);</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Predicate</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">duration_type</span><span class="special">&gt;</span>
+ <span class="keyword">void</span> <span class="identifier">relock_when_for</span><span class="special">(</span><span class="identifier">condition</span> <span class="special">&amp;</span><span class="identifier">cond</span><span class="special">,</span> <span class="identifier">Predicate</span> <span class="identifier">pred</span><span class="special">,</span>
+ <span class="identifier">duration_type</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">rel_time</span><span class="special">);</span>
+
+ <span class="callout_bug"><a name="boost.synchro13co" href="tutorial.html#boost.synchro13"><img src="../../../../../../doc/src/images/callouts/10.png" alt="10" border="0"></a></span>
+<span class="special">};</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ </p>
+<div class="calloutlist"><table border="0" summary="Callout list">
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro4"></a>1 </td>
+<td valign="top" align="left"><p> locks on construction </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro5"></a>2 </td>
+<td valign="top" align="left"><p> relock on condition </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro6"></a>3 </td>
+<td valign="top" align="left"><p> relock condition when predicate
+ satisfaied</p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro7"></a>4 </td>
+<td valign="top" align="left"><p> unlocks on destruction </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro8"></a>5 </td>
+<td valign="top" align="left"><p> safe bool idiom </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro9"></a>6 </td>
+<td valign="top" align="left"><p> always owned </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro10"></a>7 </td>
+<td valign="top" align="left"><p> always
+ owned </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro11"></a>8 </td>
+<td valign="top" align="left"><p> always owned </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro12"></a>9 </td>
+<td valign="top" align="left"><p> strict lockers specific function </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro13"></a>10 </td>
+<td valign="top" align="left"><p> no possibility
+ to unlock without blocking on wait... </p></td>
+</tr>
+</table></div>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ We may now give the complete version of the buffer class. The content
+ of the buffer is: <code class="computeroutput"><span class="identifier">data_</span><span class="special">[</span><span class="identifier">out_</span><span class="special">+</span><span class="number">1</span><span class="special">],</span>
+ <span class="identifier">data_</span><span class="special">[</span><span class="identifier">out_</span><span class="special">+</span><span class="number">2</span><span class="special">],</span> <span class="special">...</span> <span class="identifier">data_R</span><span class="special">[</span><span class="identifier">in_</span><span class="special">-</span><span class="number">1</span><span class="special">]</span></code>
+ where all the indexes are modulo size. The buffer is full if <code class="computeroutput"><span class="identifier">in_</span><span class="special">=</span><span class="identifier">out_</span></code> and it is empty if <code class="computeroutput"><span class="identifier">in_</span><span class="special">=(</span><span class="identifier">out_</span><span class="special">+</span><span class="number">1</span><span class="special">)%</span><span class="identifier">size</span></code>.
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="identifier">size</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">sync_buffer</span> <span class="special">:</span> <span class="keyword">protected</span> <span class="identifier">exclusive_monitor</span><span class="special">&lt;&gt;</span>
+<span class="special">{</span>
+ <span class="identifier">condition</span> <span class="identifier">not_full_</span><span class="special">;</span>
+ <span class="identifier">condition</span> <span class="identifier">not_empty_</span><span class="special">;</span>
+
+ <span class="identifier">T</span> <span class="identifier">data_</span><span class="special">[</span><span class="identifier">size</span><span class="special">+</span><span class="number">1</span><span class="special">];</span>
+ <span class="keyword">unsigned</span> <span class="identifier">in_</span><span class="special">,</span> <span class="identifier">out_</span><span class="special">;</span>
+
+ <span class="keyword">struct</span> <span class="identifier">not_full</span> <span class="special">{</span>
+ <span class="keyword">explicit</span> <span class="identifier">not_full</span><span class="special">(</span><span class="identifier">sync_buffer</span> <span class="special">&amp;</span><span class="identifier">b</span><span class="special">):</span><span class="identifier">that_</span><span class="special">(</span><span class="identifier">b</span><span class="special">){};</span>
+ <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">()()</span> <span class="keyword">const</span> <span class="special">{</span> <span class="keyword">return</span> <span class="special">!</span><span class="identifier">that_</span><span class="special">.</span><span class="identifier">full</span><span class="special">();</span> <span class="special">}</span>
+ <span class="identifier">sync_buffer</span> <span class="special">&amp;</span><span class="identifier">that_</span><span class="special">;</span>
+ <span class="special">};</span>
+ <span class="keyword">struct</span> <span class="identifier">not_empty</span> <span class="special">{</span>
+ <span class="keyword">explicit</span> <span class="identifier">not_empty</span><span class="special">(</span><span class="identifier">sync_buffer</span> <span class="special">&amp;</span><span class="identifier">b</span><span class="special">):</span><span class="identifier">that_</span><span class="special">(</span><span class="identifier">b</span><span class="special">){};</span>
+ <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">()()</span> <span class="keyword">const</span> <span class="special">{</span> <span class="keyword">return</span> <span class="special">!</span><span class="identifier">that_</span><span class="special">.</span><span class="identifier">empty</span><span class="special">();</span> <span class="special">}</span>
+ <span class="identifier">sync_buffer</span> <span class="special">&amp;</span><span class="identifier">that_</span><span class="special">;</span>
+ <span class="special">};</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="identifier">BOOST_COPY_CONSTRUCTOR_DELETE</span><span class="special">(</span><span class="identifier">sync_buffer</span><span class="special">)</span> <span class="callout_bug"><a name="boost.synchro71co" href="tutorial.html#boost.synchro71"><img src="../../../../../../doc/src/images/callouts/1.png" alt="1" border="0"></a></span>
+ <span class="identifier">BOOST_COPY_ASSIGNEMENT_DELETE</span><span class="special">(</span><span class="identifier">sync_buffer</span><span class="special">)</span> <span class="callout_bug"><a name="boost.synchro72co" href="tutorial.html#boost.synchro72"><img src="../../../../../../doc/src/images/callouts/2.png" alt="2" border="0"></a></span>
+ <span class="identifier">sync_buffer</span><span class="special">():</span><span class="identifier">in_</span><span class="special">(</span><span class="number">0</span><span class="special">),</span> <span class="identifier">out_</span><span class="special">(</span><span class="number">0</span><span class="special">)</span> <span class="special">{}</span>
+
+ <span class="keyword">bool</span> <span class="identifier">full</span><span class="special">()</span> <span class="special">{</span> <span class="keyword">return</span> <span class="identifier">out_</span><span class="special">==(</span><span class="identifier">in_</span><span class="special">+</span><span class="number">1</span><span class="special">)%(</span><span class="identifier">size</span><span class="special">+</span><span class="number">1</span><span class="special">);</span> <span class="special">}</span>
+ <span class="keyword">bool</span> <span class="identifier">empty</span><span class="special">()</span> <span class="special">{</span> <span class="keyword">return</span> <span class="identifier">out_</span><span class="special">==</span><span class="identifier">in_</span><span class="special">;</span> <span class="special">}</span>
+
+ <span class="keyword">unsigned</span> <span class="identifier">get_in</span><span class="special">()</span> <span class="special">{</span><span class="keyword">return</span> <span class="identifier">in_</span><span class="special">;}</span>
+ <span class="keyword">unsigned</span> <span class="identifier">get_out</span><span class="special">()</span> <span class="special">{</span><span class="keyword">return</span> <span class="identifier">out_</span><span class="special">;}</span>
+
+ <span class="keyword">void</span> <span class="identifier">push</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">v</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">synchronizer</span> <span class="identifier">_</span><span class="special">(*</span><span class="keyword">this</span><span class="special">-&gt;</span><span class="identifier">mutex</span><span class="special">(),</span> <span class="identifier">not_full_</span><span class="special">,</span> <span class="identifier">not_full</span><span class="special">(*</span><span class="keyword">this</span><span class="special">));</span> <span class="callout_bug"><a name="boost.synchro73co" href="tutorial.html#boost.synchro73"><img src="../../../../../../doc/src/images/callouts/3.png" alt="3" border="0"></a></span>
+ <span class="identifier">data_</span><span class="special">[</span><span class="identifier">in_</span><span class="special">]=</span><span class="identifier">v</span><span class="special">;</span>
+ <span class="identifier">in_</span> <span class="special">=</span> <span class="special">(</span><span class="identifier">in_</span><span class="special">+</span><span class="number">1</span><span class="special">)%</span> <span class="special">(</span><span class="identifier">size</span><span class="special">+</span><span class="number">1</span><span class="special">);</span>
+ <span class="identifier">not_empty_</span><span class="special">.</span><span class="identifier">notify_one</span><span class="special">();</span> <span class="callout_bug"><a name="boost.synchro74co" href="tutorial.html#boost.synchro74"><img src="../../../../../../doc/src/images/callouts/4.png" alt="4" border="0"></a></span>
+ <span class="special">}</span>
+
+ <span class="identifier">T</span> <span class="identifier">pull</span><span class="special">()</span> <span class="special">{</span>
+ <span class="identifier">synchronizer</span> <span class="identifier">_</span><span class="special">(*</span><span class="keyword">this</span><span class="special">-&gt;</span><span class="identifier">mutex</span><span class="special">(),</span> <span class="identifier">not_empty_</span><span class="special">,</span> <span class="identifier">not_empty</span><span class="special">(*</span><span class="keyword">this</span><span class="special">));</span> <span class="callout_bug"><a name="boost.synchro75co" href="tutorial.html#boost.synchro75"><img src="../../../../../../doc/src/images/callouts/5.png" alt="5" border="0"></a></span>
+ <span class="keyword">unsigned</span> <span class="identifier">idx</span> <span class="special">=</span> <span class="identifier">out_</span><span class="special">;</span>
+ <span class="identifier">out_</span> <span class="special">=</span> <span class="special">(</span><span class="identifier">out_</span><span class="special">+</span><span class="number">1</span><span class="special">)%</span> <span class="special">(</span><span class="identifier">size</span><span class="special">+</span><span class="number">1</span><span class="special">);</span>
+ <span class="identifier">not_full_</span><span class="special">.</span><span class="identifier">notify_one</span><span class="special">();</span> <span class="callout_bug"><a name="boost.synchro76co" href="tutorial.html#boost.synchro76"><img src="../../../../../../doc/src/images/callouts/6.png" alt="6" border="0"></a></span>
+ <span class="keyword">return</span> <span class="identifier">data_</span><span class="special">[</span><span class="identifier">idx</span><span class="special">];</span>
+ <span class="special">}</span>
+<span class="special">};</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ </p>
+<div class="calloutlist"><table border="0" summary="Callout list">
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro71"></a>1 </td>
+<td valign="top" align="left"><p> disable copy construction </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro72"></a>2 </td>
+<td valign="top" align="left"><p> disable copy asignement </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro73"></a>3 </td>
+<td valign="top" align="left"><p> waits until the
+ condition not_full is satisfyed </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro74"></a>4 </td>
+<td valign="top" align="left"><p> notifies a not_empty condition </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro75"></a>5 </td>
+<td valign="top" align="left"><p> waits
+ until the condition not_empty is satisfyed </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro76"></a>6 </td>
+<td valign="top" align="left"><p> notifies a not_full condition
+ </p></td>
+</tr>
+</table></div>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Monitors and conditions are useful for describing simple cases of shared
+ objects (by simple we mean a limited use of conditions). If the conditions
+ for delaying a calling component become complicated, the monitor may
+ similarly become difficult to program and read.
+ </p>
+</div>
+</div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.users_guide.tutorial._volatile___and__locking_ptr_"></a>volatile and locking_ptr
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="tutorial.html#boost_synchro.users_guide.tutorial._volatile___and__locking_ptr_.just_a_little_keyword">Just
+ a Little Keyword</a></span></dt>
+<dt><span class="section"><a href="tutorial.html#boost_synchro.users_guide.tutorial._volatile___and__locking_ptr_.using__volatile__with_user_defined_types">Using
+ <code class="computeroutput"><span class="keyword">volatile</span></code> with User-Defined
+ Types</a></span></dt>
+<dt><span class="section">volatile, Critical Sections, and Race Conditions</span></dt>
+<dt><span class="section">locking_ptr</span></dt>
+<dt><span class="section"><a href="tutorial.html#boost_synchro.users_guide.tutorial._volatile___and__locking_ptr_.back_to_primitive_types">Back
+ to Primitive Types</a></span></dt>
+<dt><span class="section">volatile Member Functions</span></dt>
+<dt><span class="section"><a href="tutorial.html#boost_synchro.users_guide.tutorial._volatile___and__locking_ptr_.generic__locking_ptr_">Generic
+ <code class="computeroutput"><span class="identifier">locking_ptr</span></code></a></span></dt>
+<dt><span class="section"><a href="tutorial.html#boost_synchro.users_guide.tutorial._volatile___and__locking_ptr_.specific__locking_ptr__for_lockable_value_types">Specific
+ <code class="computeroutput"><span class="identifier">locking_ptr</span></code> for lockable
+ value types</a></span></dt>
+</dl></div>
+<div class="note"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/html/images/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ This tutorial is an adaptation of the article of Andrei Alexandrescu
+ "<code class="computeroutput"><span class="keyword">volatile</span></code> - Multithreaded
+ Programmer's Best Friend" to the Boost library.
+ </p></td></tr>
+</table></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.users_guide.tutorial._volatile___and__locking_ptr_.just_a_little_keyword"></a><a href="tutorial.html#boost_synchro.users_guide.tutorial._volatile___and__locking_ptr_.just_a_little_keyword" title="Just
+ a Little Keyword">Just
+ a Little Keyword</a>
+</h5></div></div></div>
+<p>
+ Although both C and C++ Standards are conspicuously silent when it comes
+ to threads, they do make a little concession to multi-threading, in the
+ form of the volatile keyword.
+ </p>
+<p>
+ Just like its better-known counterpart const, volatile is a type modifier.
+ It's intended to be used in conjunction with variables that are accessed
+ and modified in different threads. Basically, without volatile, either
+ writing multi-threaded programs becomes impossible, or the compiler wastes
+ vast optimization opportunities. An explanation is in order.
+ </p>
+<p>
+ Consider the following code:
+ </p>
+<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">Gadget</span>
+<span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">void</span> <span class="identifier">Wait</span><span class="special">()</span>
+ <span class="special">{</span>
+ <span class="keyword">while</span> <span class="special">(!</span><span class="identifier">flag_</span><span class="special">)</span>
+ <span class="special">{</span>
+ <span class="identifier">sleep</span><span class="special">(</span><span class="number">1000</span><span class="special">);</span> <span class="comment">// sleeps for 1000 milliseconds
+</span> <span class="special">}</span>
+ <span class="special">}</span>
+ <span class="keyword">void</span> <span class="identifier">Wakeup</span><span class="special">()</span>
+ <span class="special">{</span>
+ <span class="identifier">flag_</span> <span class="special">=</span> <span class="keyword">true</span><span class="special">;</span>
+ <span class="special">}</span>
+ <span class="special">...</span>
+<span class="keyword">private</span><span class="special">:</span>
+ <span class="keyword">bool</span> <span class="identifier">flag_</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+<p>
+ The purpose of <code class="computeroutput"><span class="identifier">Gadget</span><span class="special">::</span><span class="identifier">Wait</span></code>
+ above is to check the <code class="computeroutput"><span class="identifier">flag_</span></code>
+ member variable every second and return when that variable has been set
+ to true by another thread. At least that's what its programmer intended,
+ but, alas, Wait is incorrect. Suppose the compiler figures out that
+ <code class="computeroutput"><span class="identifier">sleep</span><span class="special">(</span><span class="number">1000</span><span class="special">)</span></code> is
+ a call into an external library that cannot possibly modify the member
+ variable <code class="computeroutput"><span class="identifier">flag_</span></code>. Then
+ the compiler concludes that it can cache <code class="computeroutput"><span class="identifier">flag_</span></code>
+ in a register and use that register instead of accessing the slower on-board
+ memory. This is an excellent optimization for single-threaded code, but
+ in this case, it harms correctness: after you call Wait for some <code class="computeroutput"><span class="identifier">Gadget</span></code> object, although another thread
+ calls Wakeup, Wait will loop forever. This is because the change of
+ <code class="computeroutput"><span class="identifier">flag_</span></code> will not be reflected
+ in the register that caches <code class="computeroutput"><span class="identifier">flag_</span></code>.
+ The optimization is too ... optimistic. Caching variables in registers
+ is a very valuable optimization that applies most of the time, so it
+ would be a pity to waste it. C and C++ give you the chance to explicitly
+ disable such caching. If you use the volatile modifier on a variable,
+ the compiler won't cache that variable in registers -- each access will
+ hit the actual memory location of that variable. So all you have to do
+ to make Gadget's Wait/Wakeup combo work is to qualify <code class="computeroutput"><span class="identifier">flag_</span></code>
+ appropriately:
+ </p>
+<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">Gadget</span>
+<span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="special">...</span> <span class="identifier">as</span> <span class="identifier">above</span> <span class="special">...</span>
+<span class="keyword">private</span><span class="special">:</span>
+ <span class="keyword">volatile</span> <span class="keyword">bool</span> <span class="identifier">flag_</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+<p>
+ Most explanations of the rationale and usage of <code class="computeroutput"><span class="keyword">volatile</span></code>
+ stop here and advise you to volatile-qualify the primitive types that
+ you use in multiple threads. However, there is much more you can do with
+ <code class="computeroutput"><span class="keyword">volatile</span></code>, because it is
+ part of C++'s wonderful type system.
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.users_guide.tutorial._volatile___and__locking_ptr_.using__volatile__with_user_defined_types"></a><a href="tutorial.html#boost_synchro.users_guide.tutorial._volatile___and__locking_ptr_.using__volatile__with_user_defined_types" title="Using
+ volatile with User-Defined
+ Types">Using
+ <code class="computeroutput"><span class="keyword">volatile</span></code> with User-Defined
+ Types</a>
+</h5></div></div></div>
+<p>
+ You can volatile-qualify not only primitive types, but also user-defined
+ types. In that case, <code class="computeroutput"><span class="keyword">volatile</span></code>
+ modifies the type in a way similar to const. (You can also apply const
+ and <code class="computeroutput"><span class="keyword">volatile</span></code> to the same
+ type simultaneously.) Unlike <code class="computeroutput"><span class="keyword">const</span></code>,
+ <code class="computeroutput"><span class="keyword">volatile</span></code> discriminates between
+ primitive types and user-defined types. Namely, unlike classes, primitive
+ types still support all of their operations (addition, multiplication,
+ assignment, etc.) when volatile-qualified. For example, you can assign
+ a non-volatile <code class="computeroutput"><span class="keyword">int</span></code> to a
+ <code class="computeroutput"><span class="keyword">volatile</span></code> <code class="computeroutput"><span class="keyword">int</span></code>,
+ but you cannot assign a non-volatile object to a <code class="computeroutput"><span class="keyword">volatile</span></code>
+ object. Let's illustrate how <code class="computeroutput"><span class="keyword">volatile</span></code>
+ works on user-defined types on an example.
+ </p>
+<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">Gadget</span>
+<span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">void</span> <span class="identifier">Foo</span><span class="special">()</span> <span class="keyword">volatile</span><span class="special">;</span>
+ <span class="keyword">void</span> <span class="identifier">Bar</span><span class="special">();</span>
+ <span class="special">...</span>
+<span class="keyword">private</span><span class="special">:</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">tring</span> <span class="identifier">name_</span><span class="special">;</span>
+ <span class="keyword">int</span> <span class="identifier">state_</span><span class="special">;</span>
+<span class="special">};</span>
+<span class="special">...</span>
+<span class="identifier">Gadget</span> <span class="identifier">regularGadget</span><span class="special">;</span>
+<span class="keyword">volatile</span> <span class="identifier">Gadget</span> <span class="identifier">volatileGadget</span><span class="special">;</span>
+</pre>
+<p>
+ If you think <code class="computeroutput"><span class="keyword">volatile</span></code> is
+ not that useful with objects, prepare for some surprise.
+ </p>
+<pre class="programlisting"><span class="identifier">volatileGadget</span><span class="special">.</span><span class="identifier">Foo</span><span class="special">();</span> <span class="comment">// ok, volatile fun called for
+</span> <span class="comment">// volatile object
+</span>
+
+<span class="identifier">regularGadget</span><span class="special">.</span><span class="identifier">Foo</span><span class="special">();</span> <span class="comment">// ok, volatile fun called for
+</span> <span class="comment">// non-volatile object
+</span><span class="identifier">volatileGadget</span><span class="special">.</span><span class="identifier">Bar</span><span class="special">();</span> <span class="comment">// error! Non-volatile function called for
+</span> <span class="comment">// volatile object!
+</span></pre>
+<p>
+ The conversion from a non-qualified type to its <code class="computeroutput"><span class="keyword">volatile</span></code>
+ counterpart is trivial. However, just as with const, you cannot make
+ the trip back from <code class="computeroutput"><span class="keyword">volatile</span></code>
+ to non-qualified. You must use a cast:
+ </p>
+<pre class="programlisting"><span class="identifier">Gadget</span><span class="special">&amp;</span> <span class="identifier">ref</span> <span class="special">=</span> <span class="keyword">const_cast</span><span class="special">&lt;</span><span class="identifier">Gadget</span><span class="special">&amp;&gt;(</span><span class="identifier">volatileGadget</span><span class="special">);</span>
+<span class="identifier">ref</span><span class="special">.</span><span class="identifier">Bar</span><span class="special">();</span> <span class="comment">// ok
+</span></pre>
+<p>
+ A volatile-qualified class gives access only to a subset of its interface,
+ a subset that is under the control of the class implementer. Users can
+ gain full access to that type's interface only by using a <code class="computeroutput"><span class="keyword">const_cast</span></code>. In addition, just like constness,
+ volatileness propagates from the class to its members (for example,
+ <code class="computeroutput"><span class="identifier">volatileGadget</span><span class="special">.</span><span class="identifier">name_</span></code> and <code class="computeroutput"><span class="identifier">volatileGadget</span><span class="special">.</span><span class="identifier">state_</span></code>
+ are <code class="computeroutput"><span class="keyword">volatile</span></code> variables).
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.users_guide.tutorial._volatile___and__locking_ptr_._volatile___critical_sections__and_race_conditions"></a>volatile, Critical Sections, and Race Conditions
+</h5></div></div></div>
+<p>
+ The simplest and the most often-used synchronization device in multi-threaded
+ programs is the mutex.
+ </p>
+<p>
+ Mutexes are used to protect data against race conditions. By definition,
+ a race condition occurs when the effect of more threads on data depends
+ on how threads are scheduled. Race conditions appear when two or more
+ threads compete for using the same data. Because threads can interrupt
+ each other at arbitrary moments in time, data can be corrupted or misinterpreted.
+ Consequently, changes and sometimes accesses to data must be carefully
+ protected with critical sections. In object-oriented programming, this
+ usually means that you store a mutex in a class as a member variable
+ and use it whenever you access that class' state. Experienced multi-threaded
+ programmers might have yawned reading the two paragraphs above, but their
+ purpose is to provide an intellectual workout, because now we will link
+ with the <code class="computeroutput"><span class="keyword">volatile</span></code> connection.
+ We do this by drawing a parallel between the C++ types' world and the
+ threading semantics world.
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ Outside a critical section, any thread might interrupt any other at
+ any time; there is no control, so consequently variables accessible
+ from multiple threads are <code class="computeroutput"><span class="keyword">volatile</span></code>.
+ This is in keeping with the original intent of <code class="computeroutput"><span class="keyword">volatile</span></code>
+ -- that of preventing the compiler from unwittingly caching values
+ used by multiple threads at once.
+ </li>
+<li>
+ Inside a critical section defined by a mutex, only one thread has access.
+ Consequently, inside a critical section, the executing code has single-threaded
+ semantics. The controlled variable is not <code class="computeroutput"><span class="keyword">volatile</span></code>
+ anymore -- you can remove the <code class="computeroutput"><span class="keyword">volatile</span></code>
+ qualifier.
+ </li>
+</ul></div>
+<p>
+ In short, data shared between threads is conceptually <code class="computeroutput"><span class="keyword">volatile</span></code>
+ outside a critical section, and non-volatile inside a critical section.
+ You enter a critical section by locking a mutex. You remove the <code class="computeroutput"><span class="keyword">volatile</span></code> qualifier from a type by applying
+ a <code class="computeroutput"><span class="keyword">const_cast</span></code>. If we manage
+ to put these two operations together, we create a connection between
+ C++'s type system and an application's threading semantics. We can make
+ the compiler check race conditions for us.
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.users_guide.tutorial._volatile___and__locking_ptr_._locking_ptr_"></a>locking_ptr
+</h5></div></div></div>
+<p>
+ We need a tool that collects a mutex acquisition and a <code class="computeroutput"><span class="keyword">const_cast</span></code>. Let's develop a <code class="computeroutput"><span class="identifier">locking_ptr</span></code> class template that you
+ initialize with a volatile object obj and a mutex mtx. During its lifetime,
+ a <code class="computeroutput"><span class="identifier">locking_ptr</span></code> keeps
+ <code class="computeroutput"><span class="identifier">mtx</span></code> acquired. Also,
+ <code class="computeroutput"><span class="identifier">locking_ptr</span></code> offers access
+ to the volatile-stripped obj. The access is offered in a smart pointer
+ fashion, through operator-&gt; and operator*. The <code class="computeroutput"><span class="keyword">const_cast</span></code>
+ is performed inside <code class="computeroutput"><span class="identifier">locking_ptr</span></code>.
+ The cast is semantically valid because <code class="computeroutput"><span class="identifier">locking_ptr</span></code>
+ keeps the mutex acquired for its lifetime. First, let's define the skeleton
+ of a class <code class="computeroutput"><span class="identifier">mutex</span></code> with
+ which <code class="computeroutput"><span class="identifier">locking_ptr</span></code> will
+ work:
+ </p>
+<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">mutex</span>
+<span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">void</span> <span class="identifier">lock</span><span class="special">();</span>
+ <span class="keyword">void</span> <span class="identifier">unlock</span><span class="special">();</span>
+ <span class="special">...</span>
+<span class="special">};</span>
+</pre>
+<p>
+ <code class="computeroutput"><span class="identifier">locking_ptr</span></code> is templated
+ with the type of the controlled variable and the exclusive lockable type.
+ For example, if you want to control a Widget, you use a <code class="computeroutput"><span class="identifier">locking_ptr</span><span class="special">&lt;</span><span class="identifier">Widget</span><span class="special">&gt;</span>
+ <span class="identifier">that</span> <span class="identifier">you</span>
+ <span class="identifier">initialize</span> <span class="identifier">with</span>
+ <span class="identifier">a</span> <span class="identifier">variable</span>
+ <span class="identifier">of</span> <span class="identifier">type</span>
+ </code>volatile<code class="computeroutput"> <span class="identifier">Widget</span><span class="special">.</span> </code>locking_ptr<code class="computeroutput"> <span class="identifier">is</span>
+ <span class="identifier">very</span> <span class="identifier">simple</span><span class="special">.</span> </code>locking_ptr<code class="computeroutput"> <span class="identifier">implements</span>
+ <span class="identifier">an</span> <span class="identifier">unsophisticated</span>
+ <span class="identifier">smart</span> <span class="identifier">pointer</span><span class="special">.</span> <span class="identifier">It</span> <span class="identifier">focuses</span> <span class="identifier">solely</span>
+ <span class="identifier">on</span> <span class="identifier">collecting</span>
+ <span class="identifier">a</span> </code>const_cast` and a critical
+ section.
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">locking_ptr</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="comment">// Constructors/destructors
+</span> <span class="identifier">locking_ptr</span><span class="special">(</span><span class="keyword">volatile</span> <span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">obj</span><span class="special">,</span> <span class="identifier">mutex</span><span class="special">&amp;</span> <span class="identifier">mtx</span><span class="special">)</span>
+ <span class="special">:</span> <span class="identifier">obj_</span><span class="special">(*</span><span class="keyword">const_cast</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">*&gt;(&amp;</span><span class="identifier">obj</span><span class="special">)),</span>
+ <span class="identifier">mtx_</span><span class="special">(</span><span class="identifier">mtx</span><span class="special">)</span>
+ <span class="special">{</span> <span class="identifier">mtx_</span><span class="special">.</span><span class="identifier">lock</span><span class="special">();</span> <span class="special">}</span>
+ <span class="special">~</span><span class="identifier">locking_ptr</span><span class="special">()</span>
+ <span class="special">{</span> <span class="identifier">mtx_</span><span class="special">-&gt;</span><span class="identifier">unlock</span><span class="special">();</span> <span class="special">}</span>
+ <span class="comment">// Pointer behavior
+</span> <span class="identifier">T</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">*()</span>
+ <span class="special">{</span> <span class="keyword">return</span> <span class="identifier">obj_</span><span class="special">;</span> <span class="special">}</span>
+ <span class="identifier">T</span><span class="special">*</span> <span class="keyword">operator</span><span class="special">-&gt;()</span>
+ <span class="special">{</span> <span class="keyword">return</span> <span class="special">&amp;</span><span class="identifier">obj_</span><span class="special">;</span> <span class="special">}</span>
+<span class="keyword">private</span><span class="special">:</span>
+ <span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">obj_</span><span class="special">;</span>
+ <span class="identifier">mutex</span><span class="special">&amp;</span> <span class="identifier">mtx_</span><span class="special">;</span>
+ <span class="identifier">locking_ptr</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">locking_ptr</span><span class="special">&amp;);</span>
+ <span class="identifier">locking_ptr</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <span class="identifier">locking_ptr</span><span class="special">&amp;);</span>
+<span class="special">};</span>
+</pre>
+<p>
+ In spite of its simplicity, <code class="computeroutput"><span class="identifier">locking_ptr</span></code>
+ is a very useful aid in writing correct multi-threaded code. You should
+ define objects that are shared between threads as volatile and never
+ use <code class="computeroutput"><span class="keyword">const_cast</span></code> with them
+ -- always use <code class="computeroutput"><span class="identifier">locking_ptr</span></code>
+ automatic objects. Let's illustrate this with an example. Say you have
+ two threads that share a vector&lt;char&gt; object:
+ </p>
+<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">SynchroBuf</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">void</span> <span class="identifier">Thread1</span><span class="special">();</span>
+ <span class="keyword">void</span> <span class="identifier">Thread2</span><span class="special">();</span>
+<span class="keyword">private</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">char</span><span class="special">&gt;</span> <span class="identifier">BufT</span><span class="special">;</span>
+ <span class="keyword">volatile</span> <span class="identifier">BufT</span> <span class="identifier">buffer_</span><span class="special">;</span>
+ <span class="identifier">mutex</span> <span class="identifier">mtx_</span><span class="special">;</span> <span class="comment">// controls access to buffer_
+</span><span class="special">};</span>
+</pre>
+<p>
+ Inside a thread function, you simply use a <code class="computeroutput"><span class="identifier">locking_ptr</span><span class="special">&lt;</span><span class="identifier">BufT</span><span class="special">&gt;</span></code> to get controlled access to the
+ <code class="computeroutput"><span class="identifier">buffer_</span></code> member variable:
+ </p>
+<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">SynchroBuf</span><span class="special">::</span><span class="identifier">Thread1</span><span class="special">()</span> <span class="special">{</span>
+ <span class="identifier">locking_ptr</span><span class="special">&lt;</span><span class="identifier">BufT</span><span class="special">&gt;</span> <span class="identifier">lpBuf</span><span class="special">(</span><span class="identifier">buffer_</span><span class="special">,</span> <span class="identifier">mtx_</span><span class="special">);</span>
+ <span class="identifier">BufT</span><span class="special">::</span><span class="identifier">iterator</span> <span class="identifier">i</span> <span class="special">=</span> <span class="identifier">lpBuf</span><span class="special">-&gt;</span><span class="identifier">begin</span><span class="special">();</span>
+ <span class="keyword">for</span> <span class="special">(;</span> <span class="identifier">i</span> <span class="special">!=</span> <span class="identifier">lpBuf</span><span class="special">-&gt;</span><span class="identifier">end</span><span class="special">();</span> <span class="special">++</span><span class="identifier">i</span><span class="special">)</span> <span class="special">{</span>
+ <span class="special">...</span> <span class="identifier">use</span> <span class="special">*</span><span class="identifier">i</span> <span class="special">...</span>
+ <span class="special">}</span>
+<span class="special">}</span>
+</pre>
+<p>
+ The code is very easy to write and understand -- whenever you need to
+ use <code class="computeroutput"><span class="identifier">buffer_</span></code>, you must
+ create a <code class="computeroutput"><span class="identifier">locking_ptr</span><span class="special">&lt;</span><span class="identifier">BufT</span><span class="special">&gt;</span></code> pointing to it. Once you do that,
+ you have access to vector's entire interface. The nice part is that if
+ you make a mistake, the compiler will point it out:
+ </p>
+<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">SynchroBuf</span><span class="special">::</span><span class="identifier">Thread2</span><span class="special">()</span> <span class="special">{</span>
+ <span class="comment">// Error! Cannot access 'begin' for a volatile object
+</span> <span class="identifier">BufT</span><span class="special">::</span><span class="identifier">iterator</span> <span class="identifier">i</span> <span class="special">=</span> <span class="identifier">buffer_</span><span class="special">.</span><span class="identifier">begin</span><span class="special">();</span>
+ <span class="comment">// Error! Cannot access 'end' for a volatile object
+</span> <span class="keyword">for</span> <span class="special">(;</span> <span class="identifier">i</span> <span class="special">!=</span> <span class="identifier">lpBuf</span><span class="special">-&gt;</span><span class="identifier">end</span><span class="special">();</span> <span class="special">++</span><span class="identifier">i</span><span class="special">)</span> <span class="special">{</span>
+ <span class="special">...</span> <span class="identifier">use</span> <span class="special">*</span><span class="identifier">i</span> <span class="special">...</span>
+ <span class="special">}</span>
+<span class="special">}</span>
+</pre>
+<p>
+ You cannot access any function of <code class="computeroutput"><span class="identifier">buffer_</span></code>
+ until you either apply a <code class="computeroutput"><span class="keyword">const_cast</span></code>
+ or use <code class="computeroutput"><span class="identifier">locking_ptr</span></code>. The
+ difference is that <code class="computeroutput"><span class="identifier">locking_ptr</span></code>
+ offers an ordered way of applying <code class="computeroutput"><span class="keyword">const_cast</span></code>
+ to volatile variables. <code class="computeroutput"><span class="identifier">locking_ptr</span></code>
+ is remarkably expressive. If you only need to call one function, you
+ can create an unnamed temporary <code class="computeroutput"><span class="identifier">locking_ptr</span></code>
+ object and use it directly:
+ </p>
+<pre class="programlisting"><span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">SynchroBuf</span><span class="special">::</span><span class="identifier">Size</span><span class="special">()</span> <span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">locking_ptr</span><span class="special">&lt;</span><span class="identifier">BufT</span><span class="special">&gt;(</span><span class="identifier">buffer_</span><span class="special">,</span> <span class="identifier">mtx_</span><span class="special">)-&gt;</span><span class="identifier">size</span><span class="special">();</span>
+<span class="special">}</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.users_guide.tutorial._volatile___and__locking_ptr_.back_to_primitive_types"></a><a href="tutorial.html#boost_synchro.users_guide.tutorial._volatile___and__locking_ptr_.back_to_primitive_types" title="Back
+ to Primitive Types">Back
+ to Primitive Types</a>
+</h5></div></div></div>
+<p>
+ We saw how nicely <code class="computeroutput"><span class="keyword">volatile</span></code>
+ protects objects against uncontrolled access and how <code class="computeroutput"><span class="identifier">locking_ptr</span></code>
+ provides a simple and effective way of writing thread-safe code. Let's
+ now return to primitive types, which are treated differently by <code class="computeroutput"><span class="keyword">volatile</span></code>. Let's consider an example where
+ multiple threads share a variable of type int.
+ </p>
+<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">Counter</span>
+<span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="special">...</span>
+ <span class="keyword">void</span> <span class="identifier">Increment</span><span class="special">()</span> <span class="special">{</span> <span class="special">++</span><span class="identifier">ctr_</span><span class="special">;</span> <span class="special">}</span>
+ <span class="keyword">void</span> <span class="identifier">Decrement</span><span class="special">()</span> <span class="special">{</span> <span class="special">--</span><span class="identifier">ctr_</span><span class="special">;</span> <span class="special">}</span>
+<span class="keyword">private</span><span class="special">:</span>
+ <span class="keyword">int</span> <span class="identifier">ctr_</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+<p>
+ If Increment and Decrement are to be called from different threads, the
+ fragment above is buggy. First, <code class="computeroutput"><span class="identifier">ctr_</span></code>
+ must be volatile. Second, even a seemingly atomic operation such as
+ <code class="computeroutput"><span class="special">++</span><span class="identifier">ctr_</span></code>
+ is actually a three-stage operation. Memory itself has no arithmetic
+ capabilities. When incrementing a variable, the processor:
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ Reads that variable in a register
+ </li>
+<li>
+ Increments the value in the register
+ </li>
+<li>
+ Writes the result back to memory
+ </li>
+</ul></div>
+<p>
+ This three-step operation is called RMW (Read-Modify-Write). During the
+ Modify part of an RMW operation, most processors free the memory bus
+ in order to give other processors access to the memory. If at that time
+ another processor performs a RMW operation on the same variable, we have
+ a race condition: the second write overwrites the effect of the first.
+ To avoid that, you can rely, again, on <code class="computeroutput"><span class="identifier">locking_ptr</span></code>:
+ </p>
+<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">Counter</span>
+<span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="special">...</span>
+ <span class="keyword">void</span> <span class="identifier">Increment</span><span class="special">()</span> <span class="special">{</span> <span class="special">++*</span><span class="identifier">locking_ptr</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">mutex</span><span class="special">&gt;(</span><span class="identifier">ctr_</span><span class="special">,</span> <span class="identifier">mtx_</span><span class="special">);</span> <span class="special">}</span>
+ <span class="keyword">void</span> <span class="identifier">Decrement</span><span class="special">()</span> <span class="special">{</span> <span class="special">--*</span><span class="identifier">locking_ptr</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">mutex</span><span class="special">&gt;(</span><span class="identifier">ctr_</span><span class="special">,</span> <span class="identifier">mtx_</span><span class="special">);</span> <span class="special">}</span>
+<span class="keyword">private</span><span class="special">:</span>
+ <span class="keyword">volatile</span> <span class="keyword">int</span> <span class="identifier">ctr_</span><span class="special">;</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">mutex</span> <span class="identifier">mtx_</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+<p>
+ Now the code is correct, but its quality is inferior when compared to
+ SynchroBuf's code. Why? Because with Counter, the compiler will not warn
+ you if you mistakenly access <code class="computeroutput"><span class="identifier">ctr_</span></code>
+ directly (without locking it). The compiler compiles <code class="computeroutput"><span class="special">++</span><span class="identifier">ctr_</span></code> if <code class="computeroutput"><span class="identifier">ctr_</span></code>
+ is volatile, although the generated code is simply incorrect. The compiler
+ is not your ally anymore, and only your attention can help you avoid
+ race conditions. What should you do then? Simply encapsulate the primitive
+ data that you use in higher-level structures and use <code class="computeroutput"><span class="keyword">volatile</span></code>
+ with those structures. Paradoxically, it's worse to use <code class="computeroutput"><span class="keyword">volatile</span></code> directly with built-ins, in spite
+ of the fact that initially this was the usage intent of <code class="computeroutput"><span class="keyword">volatile</span></code>!
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.users_guide.tutorial._volatile___and__locking_ptr_._volatile__member_functions"></a>volatile Member Functions
+</h5></div></div></div>
+<p>
+ So far, we've had classes that aggregate <code class="computeroutput"><span class="keyword">volatile</span></code>
+ data members; now let's think of designing classes that in turn will
+ be part of larger objects and shared between threads. Here is where
+ <code class="computeroutput"><span class="keyword">volatile</span></code> member functions
+ can be of great help. When designing your class, you volatile-qualify
+ only those member functions that are thread safe. You must assume that
+ code from the outside will call the volatile functions from any code
+ at any time. Don't forget: <code class="computeroutput"><span class="keyword">volatile</span></code>
+ equals free multi-threaded code and no critical section; non-volatile
+ equals single-threaded scenario or inside a critical section. For example,
+ you define a class Widget that implements an operation in two variants
+ -- a thread-safe one and a fast, unprotected one.
+ </p>
+<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">Widget</span>
+<span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">void</span> <span class="identifier">Operation</span><span class="special">()</span> <span class="keyword">volatile</span><span class="special">;</span>
+ <span class="keyword">void</span> <span class="identifier">Operation</span><span class="special">();</span>
+ <span class="special">...</span>
+<span class="keyword">private</span><span class="special">:</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">mutex</span> <span class="identifier">mtx_</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+<p>
+ Notice the use of overloading. Now Widget's user can invoke Operation
+ using a uniform syntax either for volatile objects and get thread safety,
+ or for regular objects and get speed. The user must be careful about
+ defining the shared Widget objects as <code class="computeroutput"><span class="keyword">volatile</span></code>.
+ When implementing a <code class="computeroutput"><span class="keyword">volatile</span></code>
+ member function, the first operation is usually to lock this with a
+ <code class="computeroutput"><span class="identifier">locking_ptr</span></code>. Then the
+ work is done by using the non-volatile sibling:
+ </p>
+<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">Widget</span><span class="special">::</span><span class="identifier">Operation</span><span class="special">()</span> <span class="keyword">volatile</span>
+<span class="special">{</span>
+ <span class="identifier">locking_ptr</span><span class="special">&lt;</span><span class="identifier">Widget</span><span class="special">,</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mutex</span><span class="special">&gt;</span> <span class="identifier">lpThis</span><span class="special">(*</span><span class="keyword">this</span><span class="special">,</span> <span class="identifier">mtx_</span><span class="special">);</span>
+ <span class="identifier">lpThis</span><span class="special">-&gt;</span><span class="identifier">Operation</span><span class="special">();</span> <span class="comment">// invokes the non-volatile function
+</span><span class="special">}</span>
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.users_guide.tutorial._volatile___and__locking_ptr_.generic__locking_ptr_"></a><a href="tutorial.html#boost_synchro.users_guide.tutorial._volatile___and__locking_ptr_.generic__locking_ptr_" title="Generic
+ locking_ptr">Generic
+ <code class="computeroutput"><span class="identifier">locking_ptr</span></code></a>
+</h5></div></div></div>
+<p>
+ The <code class="computeroutput"><span class="identifier">locking_ptr</span></code> works
+ with a mutex class. How to use it with other mutexes? We can make a more
+ generic <code class="computeroutput"><span class="identifier">locking_ptr</span></code> adding
+ a Lockable template parameter.
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">=</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mutex</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">locking_ptr</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">T</span> <span class="identifier">value_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">Lockable</span> <span class="identifier">lockable_type</span><span class="special">;</span>
+
+ <span class="identifier">locking_ptr</span><span class="special">(</span><span class="keyword">volatile</span> <span class="identifier">value_type</span><span class="special">&amp;</span> <span class="identifier">obj</span><span class="special">,</span> <span class="identifier">lockable_type</span><span class="special">&amp;</span> <span class="identifier">mtx</span><span class="special">)</span> <span class="callout_bug"><a name="boost.synchro31co" href="tutorial.html#boost.synchro31"><img src="../../../../../../doc/src/images/callouts/1.png" alt="1" border="0"></a></span>
+ <span class="special">:</span> <span class="identifier">ptr_</span><span class="special">(</span><span class="keyword">const_cast</span><span class="special">&lt;</span><span class="identifier">value_type</span><span class="special">*&gt;(&amp;</span><span class="identifier">obj</span><span class="special">))</span> <span class="callout_bug"><a name="boost.synchro32co" href="tutorial.html#boost.synchro32"><img src="../../../../../../doc/src/images/callouts/2.png" alt="2" border="0"></a></span>
+ <span class="special">,</span> <span class="identifier">mtx_</span><span class="special">(</span><span class="identifier">mtx</span><span class="special">)</span>
+ <span class="special">{</span> <span class="identifier">mtx_</span><span class="special">.</span><span class="identifier">lock</span><span class="special">();</span> <span class="special">}</span> <span class="callout_bug"><a name="boost.synchro33co" href="tutorial.html#boost.synchro33"><img src="../../../../../../doc/src/images/callouts/3.png" alt="3" border="0"></a></span>
+ <span class="special">~</span><span class="identifier">locking_ptr</span><span class="special">()</span>
+ <span class="special">{</span> <span class="identifier">mtx_</span><span class="special">.</span><span class="identifier">unlock</span><span class="special">();</span> <span class="special">}</span> <span class="callout_bug"><a name="boost.synchro34co" href="tutorial.html#boost.synchro34"><img src="../../../../../../doc/src/images/callouts/4.png" alt="4" border="0"></a></span>
+
+ <span class="callout_bug"><a name="boost.synchro35co" href="tutorial.html#boost.synchro35"><img src="../../../../../../doc/src/images/callouts/5.png" alt="5" border="0"></a></span>
+ <span class="identifier">value_type</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">*()</span>
+ <span class="special">{</span> <span class="keyword">return</span> <span class="special">*</span><span class="identifier">ptr_</span><span class="special">;</span> <span class="special">}</span>
+ <span class="identifier">value_type</span><span class="special">*</span> <span class="keyword">operator</span><span class="special">-&gt;()</span>
+ <span class="special">{</span> <span class="keyword">return</span> <span class="identifier">ptr_</span><span class="special">;</span> <span class="special">}</span>
+
+ <span class="identifier">BOOST_DEFAULT_CONSTRUCTOR_DELETE</span><span class="special">(</span><span class="identifier">locking_ptr</span><span class="special">)</span> <span class="callout_bug"><a name="boost.synchro36co" href="tutorial.html#boost.synchro36"><img src="../../../../../../doc/src/images/callouts/6.png" alt="6" border="0"></a></span>
+ <span class="identifier">BOOST_COPY_CONSTRUCTOR_DELETE</span><span class="special">(</span><span class="identifier">locking_ptr</span><span class="special">)</span> <span class="callout_bug"><a name="boost.synchro37co" href="tutorial.html#boost.synchro37"><img src="../../../../../../doc/src/images/callouts/7.png" alt="7" border="0"></a></span>
+ <span class="identifier">BOOST_COPY_ASSIGNEMENT_DELETE</span><span class="special">(</span><span class="identifier">locking_ptr</span><span class="special">)</span> <span class="callout_bug"><a name="boost.synchro38co" href="tutorial.html#boost.synchro38"><img src="../../../../../../doc/src/images/callouts/8.png" alt="8" border="0"></a></span>
+
+<span class="keyword">private</span><span class="special">:</span>
+ <span class="identifier">value_type</span><span class="special">*</span> <span class="identifier">ptr_</span><span class="special">;</span>
+ <span class="identifier">lockable_type</span><span class="special">&amp;</span> <span class="identifier">mtx_</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ </p>
+<div class="calloutlist"><table border="0" summary="Callout list">
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro31"></a>1 </td>
+<td valign="top" align="left"><p> volatile </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro32"></a>2 </td>
+<td valign="top" align="left"><p> const_cast </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro33"></a>3 </td>
+<td valign="top" align="left"><p> locks on construction </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro34"></a>4 </td>
+<td valign="top" align="left"><p> unlocks on destruction </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro35"></a>5 </td>
+<td valign="top" align="left"><p> smart
+ pointer related operations </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro36"></a>6 </td>
+<td valign="top" align="left"><p> disable default construction </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro37"></a>7 </td>
+<td valign="top" align="left"><p> disable copy
+ construction </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro38"></a>8 </td>
+<td valign="top" align="left"><p> disable copy asignement </p></td>
+</tr>
+</table></div>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Every model of the ExclusiveLockable concept can be used as parameter.
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.users_guide.tutorial._volatile___and__locking_ptr_.specific__locking_ptr__for_lockable_value_types"></a><a href="tutorial.html#boost_synchro.users_guide.tutorial._volatile___and__locking_ptr_.specific__locking_ptr__for_lockable_value_types" title="Specific
+ locking_ptr for lockable
+ value types">Specific
+ <code class="computeroutput"><span class="identifier">locking_ptr</span></code> for lockable
+ value types</a>
+</h5></div></div></div>
+<p>
+ When the value type is itself lockable we can simplify the <code class="computeroutput"><span class="identifier">locking_ptr</span></code> as follows:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">locking_ptr_1</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">Lockable</span> <span class="identifier">value_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">Lockable</span> <span class="identifier">mutex_type</span><span class="special">;</span>
+
+ <span class="identifier">locking_ptr_1</span><span class="special">(</span><span class="keyword">volatile</span> <span class="identifier">value_type</span><span class="special">&amp;</span> <span class="identifier">obj</span><span class="special">)</span>
+ <span class="special">:</span> <span class="identifier">ptr_</span><span class="special">(</span><span class="keyword">const_cast</span><span class="special">&lt;</span><span class="identifier">value_type</span><span class="special">*&gt;(&amp;</span><span class="identifier">obj</span><span class="special">))</span>
+ <span class="special">{</span> <span class="identifier">ptr_</span><span class="special">-&gt;</span><span class="identifier">lock</span><span class="special">();</span> <span class="special">}</span>
+ <span class="special">~</span><span class="identifier">locking_ptr_1</span><span class="special">()</span>
+ <span class="special">{</span> <span class="identifier">ptr_</span><span class="special">-&gt;</span><span class="identifier">unlock</span><span class="special">();</span> <span class="special">}</span>
+
+ <span class="identifier">value_type</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">*()</span>
+ <span class="special">{</span> <span class="keyword">return</span> <span class="special">*</span><span class="identifier">ptr_</span><span class="special">;</span> <span class="special">}</span>
+ <span class="identifier">value_type</span><span class="special">*</span> <span class="keyword">operator</span><span class="special">-&gt;()</span>
+ <span class="special">{</span> <span class="keyword">return</span> <span class="identifier">ptr_</span><span class="special">;</span> <span class="special">}</span>
+
+ <span class="identifier">BOOST_DEFAULT_CONSTRUCTOR_DELETE</span><span class="special">(</span><span class="identifier">locking_ptr_1</span><span class="special">)</span> <span class="callout_bug"><a name="boost.synchro39co" href="tutorial.html#boost.synchro39"><img src="../../../../../../doc/src/images/callouts/1.png" alt="1" border="0"></a></span>
+ <span class="identifier">BOOST_COPY_CONSTRUCTOR_DELETE</span><span class="special">(</span><span class="identifier">locking_ptr_1</span><span class="special">)</span> <span class="callout_bug"><a name="boost.synchro40co" href="tutorial.html#boost.synchro40"><img src="../../../../../../doc/src/images/callouts/2.png" alt="2" border="0"></a></span>
+ <span class="identifier">BOOST_COPY_ASSIGNEMENT_DELETE</span><span class="special">(</span><span class="identifier">locking_ptr_1</span><span class="special">)</span> <span class="callout_bug"><a name="boost.synchro41co" href="tutorial.html#boost.synchro41"><img src="../../../../../../doc/src/images/callouts/3.png" alt="3" border="0"></a></span>
+
+<span class="keyword">private</span><span class="special">:</span>
+ <span class="identifier">value_type</span><span class="special">*</span> <span class="identifier">ptr_</span><span class="special">;</span> <span class="callout_bug"><a name="boost.synchro42co" href="tutorial.html#boost.synchro42"><img src="../../../../../../doc/src/images/callouts/4.png" alt="4" border="0"></a></span>
+<span class="special">};</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ </p>
+<div class="calloutlist"><table border="0" summary="Callout list">
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro39"></a>1 </td>
+<td valign="top" align="left"><p> disable default construction </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro40"></a>2 </td>
+<td valign="top" align="left"><p> disable copy construction </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro41"></a>3 </td>
+<td valign="top" align="left"><p> disable copy
+ asignement </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro42"></a>4 </td>
+<td valign="top" align="left"><p> only one pointer needed </p></td>
+</tr>
+</table></div>
+<p>
+ </p>
+<p>
+ </p>
+</div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_synchro.users_guide.tutorial.external_locking_____strict_locker__and__externally_locked__classes"></a><a href="tutorial.html#boost_synchro.users_guide.tutorial.external_locking_____strict_locker__and__externally_locked__classes" title="External
+ Locking -- strict_locker
+ and externally_locked classes">External
+ Locking -- <code class="computeroutput"><span class="identifier">strict_locker</span></code>
+ and <code class="computeroutput"><span class="identifier">externally_locked</span></code> classes</a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="tutorial.html#boost_synchro.users_guide.tutorial.external_locking_____strict_locker__and__externally_locked__classes.locks_as_permits">Locks
+ as Permits</a></span></dt>
+<dt><span class="section"><a href="tutorial.html#boost_synchro.users_guide.tutorial.external_locking_____strict_locker__and__externally_locked__classes.improving_external_locking">Improving
+ External Locking</a></span></dt>
+<dt><span class="section"><a href="tutorial.html#boost_synchro.users_guide.tutorial.external_locking_____strict_locker__and__externally_locked__classes.allowing_other_strict_lockers">Allowing
+ other strict lockers</a></span></dt>
+</dl></div>
+<div class="note"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/html/images/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ This tutorial is an adaptation of the paper of Andrei Alexandrescu "Multithreading
+ and the C++ Type System" to the Boost library.
+ </p></td></tr>
+</table></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.users_guide.tutorial.external_locking_____strict_locker__and__externally_locked__classes.locks_as_permits"></a><a href="tutorial.html#boost_synchro.users_guide.tutorial.external_locking_____strict_locker__and__externally_locked__classes.locks_as_permits" title="Locks
+ as Permits">Locks
+ as Permits</a>
+</h5></div></div></div>
+<p>
+ So what to do? Ideally, the BankAccount class should do the following:
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ Support both locking models (internal and external).
+ </li>
+<li>
+ Be efficient; that is, use no unnecessary locking.
+ </li>
+<li>
+ Be safe; that is, BankAccount objects cannot be manipulated without
+ appropriate locking.
+ </li>
+</ul></div>
+<p>
+ Let's make a worthwhile observation: Whenever you lock a BankAccount,
+ you do so by using a <code class="computeroutput"><span class="identifier">lock_guard</span><span class="special">&lt;</span><span class="identifier">BankAccount</span><span class="special">&gt;</span></code> object. Turning this statement around,
+ wherever there's a <code class="computeroutput"><span class="identifier">lock_guard</span><span class="special">&lt;</span><span class="identifier">BankAccount</span><span class="special">&gt;</span></code>, there's also a locked <code class="computeroutput"><span class="identifier">BankAccount</span></code> somewhere. Thus, you can
+ think of-and use-a <code class="computeroutput"><span class="identifier">lock_guard</span><span class="special">&lt;</span><span class="identifier">BankAccount</span><span class="special">&gt;</span></code> object as a permit. Owning a <code class="computeroutput"><span class="identifier">lock_guard</span><span class="special">&lt;</span><span class="identifier">BankAccount</span><span class="special">&gt;</span></code>
+ gives you rights to do certain things. The <code class="computeroutput"><span class="identifier">lock_guard</span><span class="special">&lt;</span><span class="identifier">BankAccount</span><span class="special">&gt;</span></code> object should not be copied or aliased
+ (it's not a transmissible permit).
+ </p>
+<div class="orderedlist"><ol type="1">
+<li>
+ As long as a permit is still alive, the <code class="computeroutput"><span class="identifier">BankAccount</span></code>
+ object stays locked.
+ </li>
+<li>
+ When the <code class="computeroutput"><span class="identifier">lock_guard</span><span class="special">&lt;</span><span class="identifier">BankAccount</span><span class="special">&gt;</span></code> is destroyed, the <code class="computeroutput"><span class="identifier">BankAccount</span></code>'s mutex is released.
+ </li>
+</ol></div>
+<p>
+ The net effect is that at any point in your code, having access to a
+ <code class="computeroutput"><span class="identifier">lock_guard</span><span class="special">&lt;</span><span class="identifier">BankAccount</span><span class="special">&gt;</span></code>
+ object guarantees that a <code class="computeroutput"><span class="identifier">BankAccount</span></code>
+ is locked. (You don't know exactly which <code class="computeroutput"><span class="identifier">BankAccount</span></code>
+ is locked, however-an issue that we'll address soon.)
+ </p>
+<p>
+ For now, let's make a couple of enhancements to the <code class="computeroutput"><span class="identifier">lock_guard</span></code>
+ class template defined in Boost.Thread. We'll call the enhanced version
+ <code class="computeroutput"><span class="identifier">strict_locker</span></code>. Essentially,
+ a <code class="computeroutput"><span class="identifier">strict_locker</span></code>'s role
+ is only to live on the stack as an automatic variable. <code class="computeroutput"><span class="identifier">strict_locker</span></code> must adhere to a non-copy
+ and non-alias policy. <code class="computeroutput"><span class="identifier">strict_locker</span></code>
+ disables copying by making the copy constructor and the assignment operator
+ private. While we're at it, let's disable operator new and operator delete;
+ <code class="computeroutput"><span class="identifier">strict_locker</span></code> are not
+ intended to be allocated on the heap. <code class="computeroutput"><span class="identifier">strict_locker</span></code>
+ avoids aliasing by using a slightly less orthodox and less well-known
+ technique: disable address taking.
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">strict_locker</span>
+<span class="special">{</span>
+
+ <span class="identifier">BOOST_CONCEPT_ASSERT</span><span class="special">((</span><span class="identifier">LockableConcept</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;));</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">Lockable</span> <span class="identifier">lockable_type</span><span class="special">;</span>
+ <span class="keyword">explicit</span> <span class="identifier">strict_locker</span><span class="special">(</span><span class="identifier">lockable_type</span><span class="special">&amp;</span> <span class="identifier">obj</span><span class="special">)</span>
+ <span class="special">:</span> <span class="identifier">obj_</span><span class="special">(</span><span class="identifier">obj</span><span class="special">)</span> <span class="special">{</span> <span class="identifier">obj</span><span class="special">.</span><span class="identifier">lock</span><span class="special">();</span> <span class="special">}</span> <span class="callout_bug"><a name="boost.synchro49co" href="tutorial.html#boost.synchro49"><img src="../../../../../../doc/src/images/callouts/1.png" alt="1" border="0"></a></span>
+ <span class="special">~</span><span class="identifier">strict_locker</span><span class="special">()</span> <span class="special">{</span> <span class="identifier">obj_</span><span class="special">.</span><span class="identifier">unlock</span><span class="special">();</span> <span class="special">}</span> <span class="callout_bug"><a name="boost.synchro50co" href="tutorial.html#boost.synchro50"><img src="../../../../../../doc/src/images/callouts/2.png" alt="2" border="0"></a></span>
+
+ <span class="keyword">typedef</span> <span class="keyword">bool</span> <span class="special">(</span><span class="identifier">strict_locker</span><span class="special">::*</span><span class="identifier">bool_type</span><span class="special">)()</span> <span class="keyword">const</span><span class="special">;</span> <span class="callout_bug"><a name="boost.synchro51co" href="tutorial.html#boost.synchro51"><img src="../../../../../../doc/src/images/callouts/3.png" alt="3" border="0"></a></span>
+ <span class="keyword">operator</span> <span class="identifier">bool_type</span><span class="special">()</span> <span class="keyword">const</span> <span class="special">{</span> <span class="keyword">return</span> <span class="special">&amp;</span><span class="identifier">strict_locker</span><span class="special">::</span><span class="identifier">owns_lock</span><span class="special">;</span> <span class="special">}</span>
+ <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">!()</span> <span class="keyword">const</span> <span class="special">{</span> <span class="keyword">return</span> <span class="keyword">false</span><span class="special">;</span> <span class="special">}</span> <span class="callout_bug"><a name="boost.synchro52co" href="tutorial.html#boost.synchro52"><img src="../../../../../../doc/src/images/callouts/4.png" alt="4" border="0"></a></span>
+ <span class="keyword">bool</span> <span class="identifier">owns_lock</span><span class="special">()</span> <span class="keyword">const</span> <span class="special">{</span> <span class="keyword">return</span> <span class="keyword">true</span><span class="special">;</span> <span class="special">}</span>
+ <span class="keyword">const</span> <span class="identifier">lockable_type</span><span class="special">*</span> <span class="identifier">mutex</span><span class="special">()</span> <span class="keyword">const</span> <span class="special">{</span> <span class="keyword">return</span> <span class="special">&amp;</span><span class="identifier">obj_</span><span class="special">;</span> <span class="special">}</span>
+ <span class="keyword">bool</span> <span class="identifier">is_locking</span><span class="special">(</span><span class="identifier">lockable_type</span><span class="special">*</span> <span class="identifier">l</span><span class="special">)</span> <span class="keyword">const</span> <span class="special">{</span> <span class="keyword">return</span> <span class="identifier">l</span><span class="special">==</span><span class="identifier">mutex</span><span class="special">();</span> <span class="special">}</span> <span class="callout_bug"><a name="boost.synchro53co" href="tutorial.html#boost.synchro53"><img src="../../../../../../doc/src/images/callouts/5.png" alt="5" border="0"></a></span>
+
+
+ <span class="identifier">BOOST_ADRESS_OF_DELETE</span><span class="special">(</span><span class="identifier">strict_locker</span><span class="special">)</span> <span class="callout_bug"><a name="boost.synchro54co" href="tutorial.html#boost.synchro54"><img src="../../../../../../doc/src/images/callouts/6.png" alt="6" border="0"></a></span>
+ <span class="identifier">BOOST_HEAP_ALLOCATEION_DELETE</span><span class="special">(</span><span class="identifier">strict_locker</span><span class="special">)</span> <span class="callout_bug"><a name="boost.synchro55co" href="tutorial.html#boost.synchro55"><img src="../../../../../../doc/src/images/callouts/7.png" alt="7" border="0"></a></span>
+ <span class="identifier">BOOST_DEFAULT_CONSTRUCTOR_DELETE</span><span class="special">(</span><span class="identifier">strict_locker</span><span class="special">)</span> <span class="callout_bug"><a name="boost.synchro56co" href="tutorial.html#boost.synchro56"><img src="../../../../../../doc/src/images/callouts/8.png" alt="8" border="0"></a></span>
+ <span class="identifier">BOOST_COPY_CONSTRUCTOR_DELETE</span><span class="special">(</span><span class="identifier">strict_locker</span><span class="special">)</span> <span class="callout_bug"><a name="boost.synchro57co" href="tutorial.html#boost.synchro57"><img src="../../../../../../doc/src/images/callouts/9.png" alt="9" border="0"></a></span>
+ <span class="identifier">BOOST_COPY_ASSIGNEMENT_DELETE</span><span class="special">(</span><span class="identifier">strict_locker</span><span class="special">)</span> <span class="callout_bug"><a name="boost.synchro58co" href="tutorial.html#boost.synchro58"><img src="../../../../../../doc/src/images/callouts/10.png" alt="10" border="0"></a></span>
+
+ <span class="callout_bug"><a name="boost.synchro59co" href="tutorial.html#boost.synchro59"><img src="../../../../../../doc/src/images/callouts/11.png" alt="11" border="0"></a></span>
+
+<span class="keyword">private</span><span class="special">:</span>
+ <span class="identifier">lockable_type</span><span class="special">&amp;</span> <span class="identifier">obj_</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ </p>
+<div class="calloutlist"><table border="0" summary="Callout list">
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro49"></a>1 </td>
+<td valign="top" align="left"><p> locks on construction </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro50"></a>2 </td>
+<td valign="top" align="left"><p> unlocks on destruction </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro51"></a>3 </td>
+<td valign="top" align="left"><p> safe bool idiom </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro52"></a>4 </td>
+<td valign="top" align="left"><p> always
+ owned </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro53"></a>5 </td>
+<td valign="top" align="left"><p> strict lockers specific function </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro54"></a>6 </td>
+<td valign="top" align="left"><p> disable aliasing </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro55"></a>7 </td>
+<td valign="top" align="left"><p> disable heap
+ allocation </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro56"></a>8 </td>
+<td valign="top" align="left"><p> disable default construction </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro57"></a>9 </td>
+<td valign="top" align="left"><p> disable copy construction </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro58"></a>10 </td>
+<td valign="top" align="left"><p> disable
+ copy asignement </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro59"></a>11 </td>
+<td valign="top" align="left"><p> no possibility to unlock </p></td>
+</tr>
+</table></div>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Silence can be sometimes louder than words-what's forbidden to do with
+ a <code class="computeroutput"><span class="identifier">strict_locker</span></code> is as
+ important as what you can do. Let's see what you can and what you cannot
+ do with a <code class="computeroutput"><span class="identifier">strict_locker</span></code>
+ instantiation:
+ </p>
+<div class="itemizedlist"><ul type="disc"><li>
+ You can create a <code class="computeroutput"><span class="identifier">strict_locker</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span></code> only starting from a valid T object.
+ Notice that there is no other way you can create a <code class="computeroutput"><span class="identifier">strict_locker</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span></code>.
+ </li></ul></div>
+<pre class="programlisting"><span class="identifier">BankAccount</span> <span class="identifier">myAccount</span><span class="special">(</span><span class="string">"John Doe"</span><span class="special">,</span> <span class="string">"123-45-6789"</span><span class="special">);</span>
+<span class="identifier">strict_locerk</span><span class="special">&lt;</span><span class="identifier">BankAccount</span><span class="special">&gt;</span> <span class="identifier">myLock</span><span class="special">(</span><span class="identifier">myAccount</span><span class="special">);</span> <span class="comment">// ok
+</span></pre>
+<div class="itemizedlist"><ul type="disc"><li>
+ You cannot copy <code class="computeroutput"><span class="identifier">strict_locker</span></code>s
+ to one another. In particular, you cannot pass <code class="computeroutput"><span class="identifier">strict_locker</span></code>s
+ by value to functions or have them returned by functions:
+ </li></ul></div>
+<pre class="programlisting"><span class="keyword">extern</span> <span class="identifier">strict_locker</span><span class="special">&lt;</span><span class="identifier">BankAccount</span><span class="special">&gt;</span> <span class="identifier">Foo</span><span class="special">();</span> <span class="comment">// compile-time error
+</span><span class="keyword">extern</span> <span class="keyword">void</span> <span class="identifier">Bar</span><span class="special">(</span><span class="identifier">strict_locker</span><span class="special">&lt;</span><span class="identifier">BankAccount</span><span class="special">&gt;);</span> <span class="comment">// compile-time error
+</span></pre>
+<div class="itemizedlist"><ul type="disc"><li>
+ However, you still can pass <code class="computeroutput"><span class="identifier">strict_locker</span></code>s
+ by reference to and from functions:
+ </li></ul></div>
+<pre class="programlisting"><span class="comment">// ok, Foo returns a reference to strict_locker&lt;BankAccount&gt;
+</span><span class="keyword">extern</span> <span class="identifier">strict_locker</span><span class="special">&lt;</span><span class="identifier">BankAccount</span><span class="special">&gt;&amp;</span> <span class="identifier">Foo</span><span class="special">();</span>
+<span class="comment">// ok, Bar takes a reference to strict_locker&lt;BankAccount&gt;
+</span><span class="keyword">extern</span> <span class="keyword">void</span> <span class="identifier">Bar</span><span class="special">(</span><span class="identifier">strict_locker</span><span class="special">&lt;</span><span class="identifier">BankAccount</span><span class="special">&gt;&amp;);</span>
+</pre>
+<div class="itemizedlist"><ul type="disc"><li>
+ You cannot allocate a <code class="computeroutput"><span class="identifier">strict_locker</span></code>
+ on the heap. However, you still can put <code class="computeroutput"><span class="identifier">strict_locker</span></code>s
+ on the heap if they're members of a class.
+ </li></ul></div>
+<pre class="programlisting"><span class="identifier">strict_locker</span><span class="special">&lt;</span><span class="identifier">BankAccount</span><span class="special">&gt;*</span> <span class="identifier">pL</span> <span class="special">=</span>
+ <span class="keyword">new</span> <span class="identifier">strict_locker</span><span class="special">&lt;</span><span class="identifier">BankAccount</span><span class="special">&gt;(</span><span class="identifier">myAcount</span><span class="special">);</span> <span class="comment">//error!
+</span> <span class="comment">// operator new is not accessible
+</span><span class="keyword">class</span> <span class="identifier">Wrapper</span> <span class="special">{</span>
+ <span class="identifier">strict_locker</span> <span class="identifier">memberLock_</span><span class="special">;</span>
+ <span class="special">...</span>
+<span class="special">};</span>
+<span class="identifier">Wrapper</span><span class="special">*</span> <span class="identifier">pW</span> <span class="special">=</span> <span class="keyword">new</span> <span class="identifier">Wrapper</span><span class="special">;</span> <span class="comment">// ok
+</span></pre>
+<p>
+ (Making <code class="computeroutput"><span class="identifier">strict_locker</span></code>
+ a member variable of a class is not recommended. Fortunately, disabling
+ copying and default construction makes <code class="computeroutput"><span class="identifier">strict_locker</span></code>
+ quite an unfriendly member variable.)
+ </p>
+<div class="itemizedlist"><ul type="disc"><li>
+ You cannot take the address of a <code class="computeroutput"><span class="identifier">strict_locker</span></code>
+ object. This interesting feature, implemented by disabling unary operator&amp;,
+ makes it very unlikely to alias a <code class="computeroutput"><span class="identifier">strict_locker</span></code>
+ object. Aliasing is still possible by taking references to a <code class="computeroutput"><span class="identifier">strict_locker</span></code>:
+ </li></ul></div>
+<pre class="programlisting"><span class="identifier">strict_locker</span><span class="special">&lt;</span><span class="identifier">BankAccount</span><span class="special">&gt;</span> <span class="identifier">myLock</span><span class="special">(</span><span class="identifier">myAccount</span><span class="special">);</span> <span class="comment">// ok
+</span><span class="identifier">strict_locker</span><span class="special">&lt;</span><span class="identifier">BankAccount</span><span class="special">&gt;*</span> <span class="identifier">pAlias</span> <span class="special">=</span> <span class="special">&amp;</span><span class="identifier">myLock</span><span class="special">;</span> <span class="comment">// error!
+</span> <span class="comment">// strict_locker&lt;BankAccount&gt;::operator&amp; is not accessible
+</span><span class="identifier">strict_locker</span><span class="special">&lt;</span><span class="identifier">BankAccount</span><span class="special">&gt;&amp;</span> <span class="identifier">rAlias</span> <span class="special">=</span> <span class="identifier">myLock</span><span class="special">;</span> <span class="comment">// ok
+</span></pre>
+<p>
+ Fortunately, references don't engender as bad aliasing as pointers because
+ they're much less versatile (references cannot be copied or reseated).
+ </p>
+<div class="itemizedlist"><ul type="disc"><li>
+ You can even make <code class="computeroutput"><span class="identifier">strict_locker</span></code>
+ final; that is, impossible to derive from. This task is left in the
+ form of an exercise to the reader.
+ </li></ul></div>
+<p>
+ All these rules were put in place with one purpose-enforcing that owning
+ a <code class="computeroutput"><span class="identifier">strict_locker</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span></code>
+ is a reasonably strong guarantee that
+ </p>
+<div class="orderedlist"><ol type="1">
+<li>
+ you locked a T object, and
+ </li>
+<li>
+ that object will be unlocked at a later point.
+ </li>
+</ol></div>
+<p>
+ Now that we have such a strict <code class="computeroutput"><span class="identifier">strict_locker</span></code>,
+ how do we harness its power in defining a safe, flexible interface for
+ BankAccount? The idea is as follows:
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ Each of BankAccount's interface functions (in our case, Deposit and
+ Withdraw) comes in two overloaded variants.
+ </li>
+<li>
+ One version keeps the same signature as before, and the other takes
+ an additional argument of type <code class="computeroutput"><span class="identifier">strict_locker</span><span class="special">&lt;</span><span class="identifier">BankAccount</span><span class="special">&gt;</span></code>. The first version is internally
+ locked; the second one requires external locking. External locking
+ is enforced at compile time by requiring client code to create a <code class="computeroutput"><span class="identifier">strict_locker</span><span class="special">&lt;</span><span class="identifier">BankAccount</span><span class="special">&gt;</span></code>
+ object.
+ </li>
+<li>
+ BankAccount avoids code bloating by having the internal locked functions
+ forward to the external locked functions, which do the actual job.
+ </li>
+</ul></div>
+<p>
+ A little code is worth 1,000 words, a (hacked into) saying goes, so here's
+ the new BankAccount class:
+ </p>
+<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">BankAccount</span>
+<span class="special">:</span> <span class="keyword">public</span> <span class="identifier">exclusive_lockable_adapter</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">:</span><span class="identifier">recursive_mutex</span><span class="special">&gt;</span>
+<span class="special">{</span>
+ <span class="keyword">int</span> <span class="identifier">balance_</span><span class="special">;</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">void</span> <span class="identifier">Deposit</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">amount</span><span class="special">,</span> <span class="identifier">strict_locker</span><span class="special">&lt;</span><span class="identifier">BankAccount</span><span class="special">&gt;&amp;)</span> <span class="special">{</span>
+ <span class="comment">// Externally locked
+</span> <span class="identifier">balance_</span> <span class="special">+=</span> <span class="identifier">amount</span><span class="special">;</span>
+ <span class="special">}</span>
+ <span class="keyword">void</span> <span class="identifier">Deposit</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">amount</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">strict_locker</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">:</span><span class="identifier">mutex</span><span class="special">&gt;</span> <span class="identifier">guard</span><span class="special">(*</span><span class="keyword">this</span><span class="special">);</span> <span class="comment">// Internally locked
+</span> <span class="identifier">Deposit</span><span class="special">(</span><span class="identifier">amount</span><span class="special">,</span> <span class="identifier">guard</span><span class="special">);</span>
+ <span class="special">}</span>
+ <span class="keyword">void</span> <span class="identifier">Withdraw</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">amount</span><span class="special">,</span> <span class="identifier">strict_locker</span><span class="special">&lt;</span><span class="identifier">BankAccount</span><span class="special">&gt;&amp;)</span> <span class="special">{</span>
+ <span class="comment">// Externally locked
+</span> <span class="identifier">balance_</span> <span class="special">-=</span> <span class="identifier">amount</span><span class="special">;</span>
+ <span class="special">}</span>
+ <span class="keyword">void</span> <span class="identifier">Withdraw</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">amount</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">strict_locker</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">:</span><span class="identifier">mutex</span><span class="special">&gt;</span> <span class="identifier">guard</span><span class="special">(*</span><span class="keyword">this</span><span class="special">);</span> <span class="comment">// Internally locked
+</span> <span class="identifier">Withdraw</span><span class="special">(</span><span class="identifier">amount</span><span class="special">,</span> <span class="identifier">guard</span><span class="special">);</span>
+ <span class="special">}</span>
+<span class="special">};</span>
+</pre>
+<p>
+ Now, if you want the benefit of internal locking, you simply call Deposit(int)
+ and Withdraw(int). If you want to use external locking, you lock the
+ object by constructing a <code class="computeroutput"><span class="identifier">strict_locker</span><span class="special">&lt;</span><span class="identifier">BankAccount</span><span class="special">&gt;</span></code> and then you call <code class="computeroutput"><span class="identifier">Deposit</span><span class="special">(</span><span class="keyword">int</span><span class="special">,</span>
+ <span class="identifier">strict_locker</span><span class="special">&lt;</span><span class="identifier">BankAccount</span><span class="special">&gt;&amp;)</span></code>
+ and <code class="computeroutput"><span class="identifier">Withdraw</span><span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="identifier">strict_locker</span><span class="special">&lt;</span><span class="identifier">BankAccount</span><span class="special">&gt;&amp;)</span></code>.
+ For example, here's the <code class="computeroutput"><span class="identifier">ATMWithdrawal</span></code>
+ function implemented correctly:
+ </p>
+<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">ATMWithdrawal</span><span class="special">(</span><span class="identifier">BankAccount</span><span class="special">&amp;</span> <span class="identifier">acct</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">sum</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">strict_locker</span><span class="special">&lt;</span><span class="identifier">BankAccount</span><span class="special">&gt;</span> <span class="identifier">guard</span><span class="special">(</span><span class="identifier">acct</span><span class="special">);</span>
+ <span class="identifier">acct</span><span class="special">.</span><span class="identifier">Withdraw</span><span class="special">(</span><span class="identifier">sum</span><span class="special">,</span> <span class="identifier">guard</span><span class="special">);</span>
+ <span class="identifier">acct</span><span class="special">.</span><span class="identifier">Withdraw</span><span class="special">(</span><span class="number">2</span><span class="special">,</span> <span class="identifier">guard</span><span class="special">);</span>
+<span class="special">}</span>
+</pre>
+<p>
+ This function has the best of both worlds-it's reasonably safe and efficient
+ at the same time.
+ </p>
+<p>
+ It's worth noting that <code class="computeroutput"><span class="identifier">strict_locker</span></code>
+ being a template gives extra safety compared to a straight polymorphic
+ approach. In such a design, BankAccount would derive from a Lockable
+ interface. <code class="computeroutput"><span class="identifier">strict_locker</span></code>
+ would manipulate Lockable references so there's no need for templates.
+ This approach is sound; however, it provides fewer compile-time guarantees.
+ Having a <code class="computeroutput"><span class="identifier">strict_locker</span></code>
+ object would only tell that some object derived from Lockable is currently
+ locked. In the templated approach, having a <code class="computeroutput"><span class="identifier">strict_locker</span><span class="special">&lt;</span><span class="identifier">BankAccount</span><span class="special">&gt;</span></code> gives a stronger guarantee-it's a
+ <code class="computeroutput"><span class="identifier">BankAccount</span></code> that stays
+ locked.
+ </p>
+<p>
+ There's a weasel word in there-I mentioned that ATMWithdrawal is reasonably
+ safe. It's not really safe because there's no enforcement that the <code class="computeroutput"><span class="identifier">strict_locker</span><span class="special">&lt;</span><span class="identifier">BankAccount</span><span class="special">&gt;</span></code>
+ object locks the appropriate BankAccount object. The type system only
+ ensures that some BankAccount object is locked. For example, consider
+ the following phony implementation of ATMWithdrawal:
+ </p>
+<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">ATMWithdrawal</span><span class="special">(</span><span class="identifier">BankAccount</span><span class="special">&amp;</span> <span class="identifier">acct</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">sum</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">BankAccount</span> <span class="identifier">fakeAcct</span><span class="special">(</span><span class="string">"John Doe"</span><span class="special">,</span> <span class="string">"123-45-6789"</span><span class="special">);</span>
+ <span class="identifier">strict_locker</span><span class="special">&lt;</span><span class="identifier">BankAccount</span><span class="special">&gt;</span> <span class="identifier">guard</span><span class="special">(</span><span class="identifier">fakeAcct</span><span class="special">);</span>
+ <span class="identifier">acct</span><span class="special">.</span><span class="identifier">Withdraw</span><span class="special">(</span><span class="identifier">sum</span><span class="special">,</span> <span class="identifier">guard</span><span class="special">);</span>
+ <span class="identifier">acct</span><span class="special">.</span><span class="identifier">Withdraw</span><span class="special">(</span><span class="number">2</span><span class="special">,</span> <span class="identifier">guard</span><span class="special">);</span>
+<span class="special">}</span>
+</pre>
+<p>
+ This code compiles warning-free but obviously doesn't do the right thing-it
+ locks one account and uses another.
+ </p>
+<p>
+ It's important to understand what can be enforced within the realm of
+ the C++ type system and what needs to be enforced at runtime. The mechanism
+ we've put in place so far ensures that some BankAccount object is locked
+ during the call to <code class="computeroutput"><span class="identifier">BankAccount</span><span class="special">::</span><span class="identifier">Withdraw</span><span class="special">(</span><span class="keyword">int</span><span class="special">,</span>
+ <span class="identifier">strict_locker</span><span class="special">&lt;</span><span class="identifier">BankAccount</span><span class="special">&gt;&amp;)</span></code>.
+ We must enforce at runtime exactly what object is locked.
+ </p>
+<p>
+ If our scheme still needs runtime checks, how is it useful? An unwary
+ or malicious programmer can easily lock the wrong object and manipulate
+ any BankAccount without actually locking it.
+ </p>
+<p>
+ First, let's get the malice issue out of the way. C is a language that
+ requires a lot of attention and discipline from the programmer. C++ made
+ some progress by asking a little less of those, while still fundamentally
+ trusting the programmer. These languages are not concerned with malice
+ (as Java is, for example). After all, you can break any C/C++ design
+ simply by using casts "appropriately" (if appropriately is
+ an, er, appropriate word in this context).
+ </p>
+<p>
+ The scheme is useful because the likelihood of a programmer forgetting
+ about any locking whatsoever is much greater than the likelihood of a
+ programmer who does remember about locking, but locks the wrong object.
+ </p>
+<p>
+ Using <code class="computeroutput"><span class="identifier">strict_locker</span></code> permits
+ compile-time checking of the most common source of errors, and runtime
+ checking of the less frequent problem.
+ </p>
+<p>
+ Let's see how to enforce that the appropriate BankAccount object is locked.
+ First, we need to add a member function to the <code class="computeroutput"><span class="identifier">strict_locker</span></code>
+ class template. The <code class="computeroutput"><span class="identifier">strict_locker</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">get_lockable</span></code>
+ function returns a reference to the locked object.
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">class</span> <span class="identifier">strict_locker</span> <span class="special">{</span>
+ <span class="special">...</span> <span class="identifier">as</span> <span class="identifier">before</span> <span class="special">...</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="identifier">T</span><span class="special">*</span> <span class="identifier">get_lockable</span><span class="special">()</span> <span class="keyword">const</span> <span class="special">{</span> <span class="keyword">return</span> <span class="special">&amp;</span><span class="identifier">obj_</span><span class="special">;</span> <span class="special">}</span>
+<span class="special">};</span>
+</pre>
+<p>
+ Second, BankAccount needs to compare the locked object against this:
+ </p>
+<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">BankAccount</span> <span class="special">{</span>
+<span class="special">:</span> <span class="keyword">public</span> <span class="identifier">exclusive_lockable_adapter</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">recursive_mutex</span><span class="special">&gt;</span>
+ <span class="keyword">int</span> <span class="identifier">balance_</span><span class="special">;</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">void</span> <span class="identifier">Deposit</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">amount</span><span class="special">,</span> <span class="identifier">strict_locker</span><span class="special">&lt;</span><span class="identifier">BankAccount</span><span class="special">&gt;&amp;</span> <span class="identifier">guard</span><span class="special">)</span> <span class="special">{</span>
+ <span class="comment">// Externally locked
+</span> <span class="keyword">if</span> <span class="special">(!</span><span class="identifier">guard</span><span class="special">.</span><span class="identifier">is_locking</span><span class="special">(*</span><span class="keyword">this</span><span class="special">))</span>
+ <span class="keyword">throw</span> <span class="string">"Locking Error: Wrong Object Locked"</span><span class="special">;</span>
+ <span class="identifier">balance_</span> <span class="special">+=</span> <span class="identifier">amount</span><span class="special">;</span>
+ <span class="special">}</span>
+<span class="special">...</span>
+<span class="special">};</span>
+</pre>
+<p>
+ The overhead incurred by the test above is much lower than locking a
+ recursive mutex for the second time.
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.users_guide.tutorial.external_locking_____strict_locker__and__externally_locked__classes.improving_external_locking"></a><a href="tutorial.html#boost_synchro.users_guide.tutorial.external_locking_____strict_locker__and__externally_locked__classes.improving_external_locking" title="Improving
+ External Locking">Improving
+ External Locking</a>
+</h5></div></div></div>
+<p>
+ Now let's assume that BankAccount doesn't use its own locking at all,
+ and has only a thread-neutral implementation:
+ </p>
+<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">BankAccount</span> <span class="special">{</span>
+ <span class="keyword">int</span> <span class="identifier">balance_</span><span class="special">;</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">void</span> <span class="identifier">Deposit</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">amount</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">balance_</span> <span class="special">+=</span> <span class="identifier">amount</span><span class="special">;</span>
+ <span class="special">}</span>
+ <span class="keyword">void</span> <span class="identifier">Withdraw</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">amount</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">balance_</span> <span class="special">-=</span> <span class="identifier">amount</span><span class="special">;</span>
+ <span class="special">}</span>
+<span class="special">};</span>
+</pre>
+<p>
+ Now you can use BankAccount in single-threaded and multi-threaded applications
+ alike, but you need to provide your own synchronization in the latter
+ case.
+ </p>
+<p>
+ Say we have an AccountManager class that holds and manipulates a BankAccount
+ object:
+ </p>
+<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">AccountManager</span>
+<span class="special">:</span> <span class="keyword">public</span> <span class="identifier">exclusive_lockable_adapter</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mutex</span><span class="special">&gt;</span>
+<span class="special">{</span>
+ <span class="identifier">BankAccount</span> <span class="identifier">checkingAcct_</span><span class="special">;</span>
+ <span class="identifier">BankAccount</span> <span class="identifier">savingsAcct_</span><span class="special">;</span>
+ <span class="special">...</span>
+<span class="special">};</span>
+</pre>
+<p>
+ Let's also assume that, by design, AccountManager must stay locked while
+ accessing its BankAccount members. The question is, how can we express
+ this design constraint using the C++ type system? How can we state "You
+ have access to this BankAccount object only after locking its parent
+ AccountManager object"?
+ </p>
+<p>
+ The solution is to use a little bridge template <code class="computeroutput"><span class="identifier">externally_locked</span></code>
+ that controls access to a BankAccount.
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">externally_locked</span> <span class="special">{</span>
+ <span class="identifier">BOOST_CONCEPT_ASSERT</span><span class="special">((</span><span class="identifier">LockableConcept</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;));</span>
+
+<span class="comment">//
+</span> <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">syntactic_lock_traits</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;::</span><span class="identifier">lock_error</span> <span class="identifier">lock_error</span><span class="special">;</span> <span class="callout_bug"><a name="boost.synchro24co" href="tutorial.html#boost.synchro24"><img src="../../../../../../doc/src/images/callouts/1.png" alt="1" border="0"></a></span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="identifier">externally_locked</span><span class="special">(</span><span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">obj</span><span class="special">,</span> <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span><span class="special">)</span>
+ <span class="special">:</span> <span class="identifier">obj_</span><span class="special">(</span><span class="identifier">obj</span><span class="special">)</span>
+ <span class="special">,</span> <span class="identifier">lockable_</span><span class="special">(</span><span class="identifier">lockable</span><span class="special">)</span>
+ <span class="special">{}</span>
+
+ <span class="identifier">externally_locked</span><span class="special">(</span><span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span><span class="special">)</span>
+ <span class="special">:</span> <span class="identifier">obj_</span><span class="special">()</span>
+ <span class="special">,</span> <span class="identifier">lockable_</span><span class="special">(</span><span class="identifier">lockable</span><span class="special">)</span>
+ <span class="special">{}</span>
+
+ <span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">get</span><span class="special">(</span><span class="identifier">strict_locker</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;&amp;</span> <span class="identifier">locker</span><span class="special">)</span> <span class="special">{</span>
+
+<span class="preprocessor">#ifndef</span> <span class="identifier">BOOST_SYNCHRO_EXTERNALLY_LOCKED_DONT_CHECK_SAME</span> <span class="callout_bug"><a name="boost.synchro25co" href="tutorial.html#boost.synchro25"><img src="../../../../../../doc/src/images/callouts/2.png" alt="2" border="0"></a></span>
+ <span class="keyword">if</span> <span class="special">(!</span><span class="identifier">locker</span><span class="special">.</span><span class="identifier">is_locking</span><span class="special">(&amp;</span><span class="identifier">lockable_</span><span class="special">))</span> <span class="keyword">throw</span> <span class="identifier">lock_error</span><span class="special">();</span> <span class="callout_bug"><a name="boost.synchro26co" href="tutorial.html#boost.synchro26"><img src="../../../../../../doc/src/images/callouts/3.png" alt="3" border="0"></a></span>
+<span class="preprocessor">#endif</span>
+ <span class="keyword">return</span> <span class="identifier">obj_</span><span class="special">;</span>
+ <span class="special">}</span>
+ <span class="keyword">void</span> <span class="identifier">set</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">obj</span><span class="special">,</span> <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">obj_</span> <span class="special">=</span> <span class="identifier">obj</span><span class="special">;</span>
+ <span class="identifier">lockable_</span><span class="special">=</span><span class="identifier">lockable</span><span class="special">;</span>
+ <span class="special">}</span>
+<span class="keyword">private</span><span class="special">:</span>
+ <span class="identifier">T</span> <span class="identifier">obj_</span><span class="special">;</span>
+ <span class="identifier">Lockable</span><span class="special">&amp;</span> <span class="identifier">lockable_</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ </p>
+<div class="calloutlist"><table border="0" summary="Callout list">
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro24"></a>1 </td>
+<td valign="top" align="left"><p> needed until Boost Thread and Interprocess unify the exceptions </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro25"></a>2 </td>
+<td valign="top" align="left"><p> define
+ BOOST_SYNCHRO_EXTERNALLY_LOCKED_DONT_CHECK_SAME if you don't want to
+ check locker check the same lockable </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro26"></a>3 </td>
+<td valign="top" align="left"><p> run time check throw if not locks
+ the same </p></td>
+</tr>
+</table></div>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ <code class="computeroutput"><span class="identifier">externally_locked</span></code> cloaks
+ an object of type T, and actually provides full access to that object
+ through the get and set member functions, provided you pass a reference
+ to a <code class="computeroutput"><span class="identifier">strict_locker</span><span class="special">&lt;</span><span class="identifier">Owner</span><span class="special">&gt;</span></code>
+ object.
+ </p>
+<p>
+ Instead of making <code class="computeroutput"><span class="identifier">checkingAcct_</span></code>
+ and <code class="computeroutput"><span class="identifier">savingsAcct_</span></code> of type
+ <code class="computeroutput"><span class="identifier">BankAccount</span></code>, <code class="computeroutput"><span class="identifier">AccountManager</span></code> holds objects of type
+ <code class="computeroutput"><span class="identifier">externally_locked</span><span class="special">&lt;</span><span class="identifier">BankAccount</span><span class="special">,</span>
+ <span class="identifier">AccountManager</span><span class="special">&gt;</span></code>:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">AccountManager</span>
+ <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">exclusive_lockable_adapter</span><span class="special">&lt;</span><span class="identifier">thread_mutex</span><span class="special">&gt;</span>
+<span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">exclusive_lockable_adapter</span><span class="special">&lt;</span><span class="identifier">thread_mutex</span><span class="special">&gt;</span> <span class="identifier">lockable_base_type</span><span class="special">;</span>
+ <span class="identifier">AccountManager</span><span class="special">()</span>
+ <span class="special">:</span> <span class="identifier">checkingAcct_</span><span class="special">(*</span><span class="keyword">this</span><span class="special">)</span>
+ <span class="special">,</span> <span class="identifier">savingsAcct_</span><span class="special">(*</span><span class="keyword">this</span><span class="special">)</span>
+ <span class="special">{}</span>
+ <span class="keyword">void</span> <span class="identifier">Checking2Savings</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">amount</span><span class="special">);</span>
+ <span class="keyword">void</span> <span class="identifier">AccountManager</span><span class="special">::</span><span class="identifier">AMoreComplicatedChecking2Savings</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">amount</span><span class="special">);</span>
+<span class="keyword">private</span><span class="special">:</span>
+
+ <span class="identifier">externally_locked_any</span><span class="special">&lt;</span><span class="identifier">BankAccount</span><span class="special">,</span> <span class="identifier">AccountManager</span><span class="special">&gt;</span> <span class="identifier">checkingAcct_</span><span class="special">;</span>
+ <span class="identifier">externally_locked_any</span><span class="special">&lt;</span><span class="identifier">BankAccount</span><span class="special">,</span> <span class="identifier">AccountManager</span><span class="special">&gt;</span> <span class="identifier">savingsAcct_</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ The pattern is the same as before-to access the BankAccount object cloaked
+ by <code class="computeroutput"><span class="identifier">checkingAcct_</span></code>, you
+ need to call <code class="computeroutput"><span class="identifier">get</span></code>. To
+ call <code class="computeroutput"><span class="identifier">get</span></code>, you need to
+ pass it a <code class="computeroutput"><span class="identifier">strict_locker</span><span class="special">&lt;</span><span class="identifier">AccountManager</span><span class="special">&gt;</span></code>. The one thing you have to take care
+ of is to not hold pointers or references you obtained by calling <code class="computeroutput"><span class="identifier">get</span></code>. If you do that, make sure that
+ you don't use them after the strict_locker has been destroyed. That is,
+ if you alias the cloaked objects, you're back from "the compiler
+ takes care of that" mode to "you must pay attention" mode.
+ </p>
+<p>
+ Typically, you use <code class="computeroutput"><span class="identifier">externally_locked</span></code>
+ as shown below. Suppose you want to execute an atomic transfer from your
+ checking account to your savings account:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">AccountManager</span><span class="special">::</span><span class="identifier">Checking2Savings</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">amount</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">strict_locker</span><span class="special">&lt;</span><span class="identifier">AccountManager</span><span class="special">&gt;</span> <span class="identifier">guard</span><span class="special">(*</span><span class="keyword">this</span><span class="special">);</span>
+ <span class="identifier">checkingAcct_</span><span class="special">.</span><span class="identifier">get</span><span class="special">(</span><span class="identifier">guard</span><span class="special">).</span><span class="identifier">Withdraw</span><span class="special">(</span><span class="identifier">amount</span><span class="special">);</span>
+ <span class="identifier">savingsAcct_</span><span class="special">.</span><span class="identifier">get</span><span class="special">(</span><span class="identifier">guard</span><span class="special">).</span><span class="identifier">Deposit</span><span class="special">(</span><span class="identifier">amount</span><span class="special">);</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ We achieved two important goals. First, the declaration of <code class="computeroutput"><span class="identifier">checkingAcct_</span></code> and <code class="computeroutput"><span class="identifier">savingsAcct_</span></code>
+ makes it clear to the code reader that that variable is protected by
+ a lock on an AccountManager. Second, the design makes it impossible to
+ manipulate the two accounts without actually locking a BankAccount.
+ <code class="computeroutput"><span class="identifier">externally_locked</span></code> is
+ what could be called active documentation.
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_synchro.users_guide.tutorial.external_locking_____strict_locker__and__externally_locked__classes.allowing_other_strict_lockers"></a><a href="tutorial.html#boost_synchro.users_guide.tutorial.external_locking_____strict_locker__and__externally_locked__classes.allowing_other_strict_lockers" title="Allowing
+ other strict lockers">Allowing
+ other strict lockers</a>
+</h5></div></div></div>
+<p>
+ Now imagine that the AccountManager function needs to take a <code class="computeroutput"><span class="identifier">unique_lock</span></code> in order to reduce the
+ critical regions. And at some time it needs to access to the <code class="computeroutput"><span class="identifier">checkingAcct_</span></code>. As <code class="computeroutput"><span class="identifier">unique_lock</span></code>
+ is not a strict lock the following code do not compiles:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">AccountManager</span><span class="special">::</span><span class="identifier">AMoreComplicatedChecking2Savings</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">amount</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">unique_lock</span><span class="special">&lt;</span><span class="identifier">AccountManager</span><span class="special">&gt;</span> <span class="identifier">guard</span><span class="special">(*</span><span class="keyword">this</span><span class="special">);</span>
+ <span class="keyword">if</span> <span class="special">(</span><span class="identifier">some_condition</span><span class="special">())</span> <span class="special">{</span>
+ <span class="identifier">guard</span><span class="special">.</span><span class="identifier">lock</span><span class="special">();</span>
+ <span class="special">}</span>
+ <span class="identifier">checkingAcct_</span><span class="special">.</span><span class="identifier">get</span><span class="special">(</span><span class="identifier">guard</span><span class="special">).</span><span class="identifier">Withdraw</span><span class="special">(</span><span class="identifier">amount</span><span class="special">);</span>
+ <span class="identifier">savingsAcct_</span><span class="special">.</span><span class="identifier">get</span><span class="special">(</span><span class="identifier">guard</span><span class="special">).</span><span class="identifier">Deposit</span><span class="special">(</span><span class="identifier">amount</span><span class="special">);</span>
+ <span class="identifier">guard1</span><span class="special">.</span><span class="identifier">unlock</span><span class="special">();</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ We need a way to transfer the ownership from the <code class="computeroutput"><span class="identifier">unique_lock</span></code>
+ to a <code class="computeroutput"><span class="identifier">strict_locker</span></code> the
+ time we are working with <code class="computeroutput"><span class="identifier">savingsAcct_</span></code>
+ and then restore the ownership on <code class="computeroutput"><span class="identifier">unique_lock</span></code>.
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">AccountManager</span><span class="special">::</span><span class="identifier">AMoreComplicatedChecking2Savings</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">amount</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">unique_lock</span><span class="special">&lt;</span><span class="identifier">AccountManager</span><span class="special">&gt;</span> <span class="identifier">guard1</span><span class="special">(*</span><span class="keyword">this</span><span class="special">);</span>
+ <span class="keyword">if</span> <span class="special">(</span><span class="identifier">some_condition</span><span class="special">())</span> <span class="special">{</span>
+ <span class="identifier">guard1</span><span class="special">.</span><span class="identifier">lock</span><span class="special">();</span>
+ <span class="special">}</span>
+ <span class="special">{</span>
+ <span class="identifier">strict_locker</span><span class="special">&lt;</span><span class="identifier">AccountManager</span><span class="special">&gt;</span> <span class="identifier">guard</span><span class="special">(</span><span class="identifier">guard1</span><span class="special">);</span>
+ <span class="identifier">checkingAcct_</span><span class="special">.</span><span class="identifier">get</span><span class="special">(</span><span class="identifier">guard</span><span class="special">).</span><span class="identifier">Withdraw</span><span class="special">(</span><span class="identifier">amount</span><span class="special">);</span>
+ <span class="identifier">savingsAcct_</span><span class="special">.</span><span class="identifier">get</span><span class="special">(</span><span class="identifier">guard</span><span class="special">).</span><span class="identifier">Deposit</span><span class="special">(</span><span class="identifier">amount</span><span class="special">);</span>
+ <span class="special">}</span>
+ <span class="identifier">guard1</span><span class="special">.</span><span class="identifier">unlock</span><span class="special">();</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ In order to make this code compilable we need to store either a Lockable
+ or a <code class="computeroutput"><span class="identifier">unique_lock</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;</span></code>
+ reference depending on the constructor. Store which kind of reference
+ we have stored,and in the destructor call either to the Lockable <code class="computeroutput"><span class="identifier">unlock</span></code> or restore the ownership.
+ </p>
+<p>
+ This seams too complicated to me. Another possibility is to define a
+ nested strict locker class. The drawback is that instead of having only
+ one strict locker we have two and we need either to duplicate every function
+ taking a <code class="computeroutput"><span class="identifier">strict</span><span class="special">\</span><span class="identifier">_lock</span></code> or make these function templates
+ functions. The problem with template functions is that we don't profit
+ anymore of the C++ type system. We must add some static metafunction
+ that check that the Locker parameter is a strict locker. The problem
+ is that we can not really check this or can we?. The <code class="computeroutput"><span class="identifier">is_strict_locker</span></code>
+ metafunction must be specialized by the strict locker developer. We need
+ to belive it "sur parolle". The advantage is that now we can
+ manage with more than two strict lockers without changing our code. Ths
+ is really nice.
+ </p>
+<p>
+ Now we need to state that both classes are <code class="computeroutput"><span class="identifier">strict_locker</span></code>s.
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Locker</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">is_strict_locker</span> <span class="special">:</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span> <span class="special">{};</span>
+
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">is_strict_locker</span><span class="special">&lt;</span><span class="identifier">strict_locker</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">:</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span> <span class="special">{}</span>
+
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Locker</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">is_strict_locker</span><span class="special">&lt;</span><span class="identifier">nested_strict_locker</span><span class="special">&lt;</span><span class="identifier">Locker</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">:</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span> <span class="special">{}</span>
+</pre>
+<p>
+ Well let me show how this <code class="computeroutput"><span class="identifier">nested_strict_locker</span></code>
+ class looks like and the impacts on the <code class="computeroutput"><span class="identifier">externally_locked</span></code>
+ class and the <code class="computeroutput"><span class="identifier">AccountManager</span><span class="special">::</span><span class="identifier">AMoreComplicatedFunction</span></code>
+ function.
+ </p>
+<p>
+ First <code class="computeroutput"><span class="identifier">nested_strict_locker</span></code>
+ class will store on a temporary lock the <code class="computeroutput"><span class="identifier">Locker</span></code>,
+ and transfer the lock ownership on the constructor. On destruction he
+ will restore the ownership. Note also that the Locker needs to have already
+ a reference to the mutex otherwise an exception is thrown and the use
+ of the <code class="computeroutput"><span class="identifier">locker_traits</span></code>.
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Locker</span> <span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">nested_strict_locker</span>
+ <span class="special">{</span>
+ <span class="identifier">BOOST_CONCEPT_ASSERT</span><span class="special">((</span><span class="identifier">MovableLockerConcept</span><span class="special">&lt;</span><span class="identifier">Locker</span><span class="special">&gt;));</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">lockable_type</span><span class="special">&lt;</span><span class="identifier">Locker</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">lockable_type</span><span class="special">;</span> <span class="callout_bug"><a name="boost.synchro60co" href="tutorial.html#boost.synchro60"><img src="../../../../../../doc/src/images/callouts/1.png" alt="1" border="0"></a></span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">syntactic_lock_traits</span><span class="special">&lt;</span><span class="identifier">lockable_type</span><span class="special">&gt;::</span><span class="identifier">lock_error</span> <span class="identifier">lock_error</span><span class="special">;</span>
+
+ <span class="identifier">nested_strict_locker</span><span class="special">(</span><span class="identifier">Locker</span><span class="special">&amp;</span> <span class="identifier">locker</span><span class="special">)</span>
+ <span class="special">:</span> <span class="identifier">locker_</span><span class="special">(</span><span class="identifier">locker</span><span class="special">)</span> <span class="callout_bug"><a name="boost.synchro61co" href="tutorial.html#boost.synchro61"><img src="../../../../../../doc/src/images/callouts/2.png" alt="2" border="0"></a></span>
+ <span class="special">,</span> <span class="identifier">tmp_locker_</span><span class="special">(</span><span class="identifier">locker</span><span class="special">.</span><span class="identifier">move</span><span class="special">())</span> <span class="callout_bug"><a name="boost.synchro62co" href="tutorial.html#boost.synchro62"><img src="../../../../../../doc/src/images/callouts/3.png" alt="3" border="0"></a></span>
+ <span class="special">{</span>
+ <span class="preprocessor">#ifndef</span> <span class="identifier">BOOST_SYNCHRO_STRCIT_LOCKER_DONT_CHECK_OWNERSHIP</span> <span class="callout_bug"><a name="boost.synchro63co" href="tutorial.html#boost.synchro63"><img src="../../../../../../doc/src/images/callouts/4.png" alt="4" border="0"></a></span>
+ <span class="keyword">if</span> <span class="special">(</span><span class="identifier">tmp_locker_</span><span class="special">.</span><span class="identifier">mutex</span><span class="special">()==</span><span class="number">0</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">locker_</span><span class="special">=</span><span class="identifier">tmp_locker_</span><span class="special">.</span><span class="identifier">move</span><span class="special">();</span> <span class="callout_bug"><a name="boost.synchro64co" href="tutorial.html#boost.synchro64"><img src="../../../../../../doc/src/images/callouts/5.png" alt="5" border="0"></a></span>
+ <span class="keyword">throw</span> <span class="identifier">lock_error</span><span class="special">();</span>
+ <span class="special">}</span>
+ <span class="preprocessor">#endif</span>
+ <span class="keyword">if</span> <span class="special">(!</span><span class="identifier">tmp_locker_</span><span class="special">)</span> <span class="identifier">tmp_locker_</span><span class="special">.</span><span class="identifier">lock</span><span class="special">();</span> <span class="callout_bug"><a name="boost.synchro65co" href="tutorial.html#boost.synchro65"><img src="../../../../../../doc/src/images/callouts/6.png" alt="6" border="0"></a></span>
+ <span class="special">}</span>
+ <span class="special">~</span><span class="identifier">nested_strict_locker</span><span class="special">()</span> <span class="special">{</span>
+ <span class="identifier">locker_</span><span class="special">=</span><span class="identifier">tmp_locker_</span><span class="special">.</span><span class="identifier">move</span><span class="special">();</span> <span class="callout_bug"><a name="boost.synchro66co" href="tutorial.html#boost.synchro66"><img src="../../../../../../doc/src/images/callouts/7.png" alt="7" border="0"></a></span>
+ <span class="special">}</span>
+ <span class="keyword">typedef</span> <span class="keyword">bool</span> <span class="special">(</span><span class="identifier">nested_strict_locker</span><span class="special">::*</span><span class="identifier">bool_type</span><span class="special">)()</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="keyword">operator</span> <span class="identifier">bool_type</span><span class="special">()</span> <span class="keyword">const</span> <span class="special">{</span> <span class="keyword">return</span> <span class="special">&amp;</span><span class="identifier">nested_strict_locker</span><span class="special">::</span><span class="identifier">owns_lock</span><span class="special">;</span> <span class="special">}</span>
+ <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">!()</span> <span class="keyword">const</span> <span class="special">{</span> <span class="keyword">return</span> <span class="keyword">false</span><span class="special">;</span> <span class="special">}</span>
+ <span class="keyword">bool</span> <span class="identifier">owns_lock</span><span class="special">()</span> <span class="keyword">const</span> <span class="special">{</span> <span class="keyword">return</span> <span class="keyword">true</span><span class="special">;</span> <span class="special">}</span>
+ <span class="keyword">const</span> <span class="identifier">lockable_type</span><span class="special">*</span> <span class="identifier">mutex</span><span class="special">()</span> <span class="keyword">const</span> <span class="special">{</span> <span class="keyword">return</span> <span class="identifier">tmp_locker_</span><span class="special">.</span><span class="identifier">mutex</span><span class="special">();</span> <span class="special">}</span>
+ <span class="keyword">bool</span> <span class="identifier">is_locking</span><span class="special">(</span><span class="identifier">lockable_type</span><span class="special">*</span> <span class="identifier">l</span><span class="special">)</span> <span class="keyword">const</span> <span class="special">{</span> <span class="keyword">return</span> <span class="identifier">l</span><span class="special">==</span><span class="identifier">mutex</span><span class="special">();</span> <span class="special">}</span>
+
+ <span class="identifier">BOOST_ADRESS_OF_DELETE</span><span class="special">(</span><span class="identifier">nested_strict_locker</span><span class="special">)</span>
+ <span class="identifier">BOOST_HEAP_ALLOCATEION_DELETE</span><span class="special">(</span><span class="identifier">nested_strict_locker</span><span class="special">)</span>
+ <span class="identifier">BOOST_DEFAULT_CONSTRUCTOR_DELETE</span><span class="special">(</span><span class="identifier">nested_strict_locker</span><span class="special">)</span> <span class="callout_bug"><a name="boost.synchro67co" href="tutorial.html#boost.synchro67"><img src="../../../../../../doc/src/images/callouts/8.png" alt="8" border="0"></a></span>
+ <span class="identifier">BOOST_COPY_CONSTRUCTOR_DELETE</span><span class="special">(</span><span class="identifier">nested_strict_locker</span><span class="special">)</span> <span class="callout_bug"><a name="boost.synchro68co" href="tutorial.html#boost.synchro68"><img src="../../../../../../doc/src/images/callouts/9.png" alt="9" border="0"></a></span>
+ <span class="identifier">BOOST_COPY_ASSIGNEMENT_DELETE</span><span class="special">(</span><span class="identifier">nested_strict_locker</span><span class="special">)</span> <span class="callout_bug"><a name="boost.synchro69co" href="tutorial.html#boost.synchro69"><img src="../../../../../../doc/src/images/callouts/10.png" alt="10" border="0"></a></span>
+
+<span class="keyword">private</span><span class="special">:</span>
+ <span class="identifier">Locker</span><span class="special">&amp;</span> <span class="identifier">locker_</span><span class="special">;</span>
+ <span class="identifier">Locker</span> <span class="identifier">tmp_locker_</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ </p>
+<div class="calloutlist"><table border="0" summary="Callout list">
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro60"></a>1 </td>
+<td valign="top" align="left"><p> Name the lockable type locked by Locker </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro61"></a>2 </td>
+<td valign="top" align="left"><p> Store reference to locker </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro62"></a>3 </td>
+<td valign="top" align="left"><p> Move
+ ownership to temporaty locker </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro63"></a>4 </td>
+<td valign="top" align="left"><p> Define BOOST_SYNCHRO_EXTERNALLY_LOCKED_DONT_CHECK_OWNERSHIP
+ if you don't want to check locker ownership </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro64"></a>5 </td>
+<td valign="top" align="left"><p> Rollback for coherency
+ purposes </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro65"></a>6 </td>
+<td valign="top" align="left"><p> ensures it is locked </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro66"></a>7 </td>
+<td valign="top" align="left"><p> Move ownership to nesting locker </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro67"></a>8 </td>
+<td valign="top" align="left"><p> disable
+ default construction </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro68"></a>9 </td>
+<td valign="top" align="left"><p> disable copy construction </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro69"></a>10 </td>
+<td valign="top" align="left"><p> disable copy asignement
+ </p></td>
+</tr>
+</table></div>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ The <code class="computeroutput"><span class="identifier">externally_locked</span></code>
+ get function is now a template function taking a Locker as parameters
+ instead of a <code class="computeroutput"><span class="identifier">strict_locker</span></code>.
+ We can add test in debug mode that ensure that the Lockable object is
+ locked.
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Lockable</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">externally_locked_any</span> <span class="special">{</span>
+
+<span class="comment">//
+</span><span class="keyword">public</span><span class="special">:</span>
+
+ <span class="comment">// ... as before
+</span> <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Locker</span><span class="special">&gt;</span>
+ <span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">get</span><span class="special">(</span><span class="identifier">Locker</span><span class="special">&amp;</span> <span class="identifier">locker</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">BOOST_CONCEPT_ASSERT</span><span class="special">((</span><span class="identifier">StrictLockerConcept</span><span class="special">&lt;</span><span class="identifier">Locker</span><span class="special">&gt;));</span>
+
+ <span class="identifier">BOOST_STATIC_ASSERT</span><span class="special">((</span><span class="identifier">is_strict_locker</span><span class="special">&lt;</span><span class="identifier">Locker</span><span class="special">&gt;::</span><span class="identifier">value</span><span class="special">));</span> <span class="callout_bug"><a name="boost.synchro27co" href="tutorial.html#boost.synchro27"><img src="../../../../../../doc/src/images/callouts/1.png" alt="1" border="0"></a></span>
+ <span class="identifier">BOOST_STATIC_ASSERT</span><span class="special">((</span><span class="identifier">is_same</span><span class="special">&lt;</span><span class="identifier">Lockable</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">lockable_type</span><span class="special">&lt;</span><span class="identifier">Locker</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">&gt;::</span><span class="identifier">value</span><span class="special">));</span> <span class="callout_bug"><a name="boost.synchro28co" href="tutorial.html#boost.synchro28"><img src="../../../../../../doc/src/images/callouts/2.png" alt="2" border="0"></a></span>
+<span class="preprocessor">#ifndef</span> <span class="identifier">BOOST_SYNCHRO_EXTERNALLY_LOCKED_DONT_CHECK_OWNERSHIP</span> <span class="callout_bug"><a name="boost.synchro29co" href="tutorial.html#boost.synchro29"><img src="../../../../../../doc/src/images/callouts/3.png" alt="3" border="0"></a></span>
+ <span class="keyword">if</span> <span class="special">(!</span> <span class="identifier">locker</span> <span class="special">)</span> <span class="keyword">throw</span> <span class="identifier">lock_error</span><span class="special">();</span> <span class="callout_bug"><a name="boost.synchro30co" href="tutorial.html#boost.synchro30"><img src="../../../../../../doc/src/images/callouts/4.png" alt="4" border="0"></a></span>
+<span class="preprocessor">#endif</span>
+<span class="preprocessor">#ifndef</span> <span class="identifier">BOOST_SYNCHRO_EXTERNALLY_LOCKED_DONT_CHECK_SAME</span>
+ <span class="keyword">if</span> <span class="special">(!</span><span class="identifier">locker</span><span class="special">.</span><span class="identifier">is_locking</span><span class="special">(&amp;</span><span class="identifier">lockable_</span><span class="special">))</span> <span class="keyword">throw</span> <span class="identifier">lock_error</span><span class="special">();</span>
+<span class="preprocessor">#endif</span>
+ <span class="keyword">return</span> <span class="identifier">obj_</span><span class="special">;</span>
+ <span class="special">}</span>
+
+<span class="special">};</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ </p>
+<div class="calloutlist"><table border="0" summary="Callout list">
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro27"></a>1 </td>
+<td valign="top" align="left"><p> locker is a strict locker "sur parolle" </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro28"></a>2 </td>
+<td valign="top" align="left"><p> that locks the same
+ type </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro29"></a>3 </td>
+<td valign="top" align="left"><p> define BOOST_SYNCHRO_EXTERNALLY_LOCKED_NO_CHECK_OWNERSHIP if you
+ don't want to check locker ownership </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="boost.synchro30"></a>4 </td>
+<td valign="top" align="left"><p> run time check throw if no locked
+ </p></td>
+</tr>
+</table></div>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ The <code class="computeroutput"><span class="identifier">AccountManager</span><span class="special">::</span><span class="identifier">AMoreComplicatedFunction</span></code> function needs
+ only to replace the <code class="computeroutput"><span class="identifier">strict_locker</span></code>
+ by a <code class="computeroutput"><span class="identifier">nested_strict_locker</span></code>.
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">AccountManager</span><span class="special">::</span><span class="identifier">AMoreComplicatedChecking2Savings</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">amount</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">unique_lock</span><span class="special">&lt;</span><span class="identifier">AccountManager</span><span class="special">&gt;</span> <span class="identifier">guard1</span><span class="special">(*</span><span class="keyword">this</span><span class="special">);</span>
+ <span class="keyword">if</span> <span class="special">(</span><span class="identifier">some_condition</span><span class="special">())</span> <span class="special">{</span>
+ <span class="identifier">guard1</span><span class="special">.</span><span class="identifier">lock</span><span class="special">();</span>
+ <span class="special">}</span>
+ <span class="special">{</span>
+ <span class="identifier">nested_strict_locker</span><span class="special">&lt;</span><span class="identifier">unique_lock</span><span class="special">&lt;</span><span class="identifier">AccountManager</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">guard</span><span class="special">(</span><span class="identifier">guard1</span><span class="special">);</span>
+ <span class="identifier">checkingAcct_</span><span class="special">.</span><span class="identifier">get</span><span class="special">(</span><span class="identifier">guard</span><span class="special">).</span><span class="identifier">Withdraw</span><span class="special">(</span><span class="identifier">amount</span><span class="special">);</span>
+ <span class="identifier">savingsAcct_</span><span class="special">.</span><span class="identifier">get</span><span class="special">(</span><span class="identifier">guard</span><span class="special">).</span><span class="identifier">Deposit</span><span class="special">(</span><span class="identifier">amount</span><span class="special">);</span>
+ <span class="special">}</span>
+ <span class="identifier">guard1</span><span class="special">.</span><span class="identifier">unlock</span><span class="special">();</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+</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"><div class="copyright-footer">Copyright © 2008 Vicente J. Botet Escriba<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="getting_started.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../users_guide.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="ext_references.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/synchro/libs/synchro/doc/html/index.html
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/html/index.html 2009-10-12 17:49:35 EDT (Mon, 12 Oct 2009)
@@ -0,0 +1,106 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Chapter 1. Boost.Synchro</title>
+<link rel="stylesheet" href="../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+<link rel="start" href="index.html" title="Chapter 1. Boost.Synchro">
+<link rel="next" href="boost_synchro/overview.html" title=" Overview">
+</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">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav"><a accesskey="n" href="boost_synchro/overview.html"><img src="../../../../doc/html/images/next.png" alt="Next"></a></div>
+<div class="chapter" lang="en">
+<div class="titlepage"><div>
+<div><h2 class="title">
+<a name="boost.synchro"></a>Chapter 1. Boost.Synchro</h2></div>
+<div><div class="author"><h3 class="author">
+<span class="firstname">Vicente J.</span> <span class="surname">Botet Escriba</span>
+</h3></div></div>
+<div><p class="copyright">Copyright © 2008 Vicente J. Botet Escriba</p></div>
+<div><div class="legalnotice">
+<a name="id4803218"></a><p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></div>
+</div></div>
+<div class="toc">
+<p><b>Table of Contents</b></p>
+<dl>
+<dt><span class="section"> Overview</span></dt>
+<dd><dl><dt><span class="section"> Introduction</span></dt></dl></dd>
+<dt><span class="section"> Users'Guide</span></dt>
+<dd><dl>
+<dt><span class="section"> Getting Started</span></dt>
+<dt><span class="section"> Tutorial</span></dt>
+<dt><span class="section"> References</span></dt>
+<dt><span class="section"> Glossary</span></dt>
+</dl></dd>
+<dt><span class="section">Reference</span></dt>
+<dd><dl>
+<dt><span class="section">Lockables</span></dt>
+<dt><span class="section"><a href="boost_synchro/reference/generic_free_functions_on_lockable.html">Generic
+ Free Functions on Lockable</a></span></dt>
+<dt><span class="section"><a href="boost_synchro/reference/generic_free_functions_on_multiple_lockables.html">Generic
+ Free Functions on Multiple Lockables</a></span></dt>
+<dt><span class="section"><a href="boost_synchro/reference/condition_lockables.html">Condition
+ Lockables</a></span></dt>
+<dt><span class="section">Lockers</span></dt>
+<dt><span class="section">Single-threaded</span></dt>
+<dt><span class="section">Multi-threaded</span></dt>
+<dt><span class="section">Multi-process</span></dt>
+<dt><span class="section"><a href="boost_synchro/reference/polymorphic_locks.html">Polymorphic
+ Locks</a></span></dt>
+<dt><span class="section">Other</span></dt>
+<dt><span class="section">High Level</span></dt>
+</dl></dd>
+<dt><span class="section">Examples</span></dt>
+<dt><span class="section">Appendices</span></dt>
+<dd><dl>
+<dt><span class="section"> Appendix A: History</span></dt>
+<dt><span class="section"> Appendix B: Rationale</span></dt>
+<dt><span class="section"><a href="boost_synchro/appendices/implementation.html"> Appendix C:
+ Implementation Notes</a></span></dt>
+<dt><span class="section"><a href="boost_synchro/appendices/acknowledgements.html"> Appendix
+ D: Acknowledgements</a></span></dt>
+<dt><span class="section"><a href="boost_synchro/appendices/appendix_e__tests.html">Appendix
+ E: Tests</a></span></dt>
+<dt><span class="section"><a href="boost_synchro/appendices/appendix_f__tickets.html">Appendix
+ F: Tickets</a></span></dt>
+<dt><span class="section"> Appendix E: Future plans</span></dt>
+</dl></dd>
+</dl>
+</div>
+<div class="warning"><table border="0" summary="Warning">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="../../../../doc/html/images/warning.png"></td>
+<th align="left">Warning</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ Synchro is not a part of the Boost libraries.
+ </p></td></tr>
+</table></div>
+<p>
+ [/
+ </p>
+<p>
+ [/
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"><p><small>Last revised: October 05, 2009 at 15:46:19 GMT</small></p></td>
+<td align="right"><div class="copyright-footer"></div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav"><a accesskey="n" href="boost_synchro/overview.html"><img src="../../../../doc/html/images/next.png" alt="Next"></a></div>
+</body>
+</html>

Added: sandbox/synchro/libs/synchro/doc/html/standalone_HTML.manifest
==============================================================================
--- (empty file)
+++ sandbox/synchro/libs/synchro/doc/html/standalone_HTML.manifest 2009-10-12 17:49:35 EDT (Mon, 12 Oct 2009)
@@ -0,0 +1,29 @@
+index.html
+boost_synchro/overview.html
+boost_synchro/overview/intro.html
+boost_synchro/users_guide.html
+boost_synchro/users_guide/getting_started.html
+boost_synchro/users_guide/tutorial.html
+boost_synchro/users_guide/ext_references.html
+boost_synchro/users_guide/glosary.html
+boost_synchro/reference.html
+boost_synchro/reference/lockables.html
+boost_synchro/reference/generic_free_functions_on_lockable.html
+boost_synchro/reference/generic_free_functions_on_multiple_lockables.html
+boost_synchro/reference/condition_lockables.html
+boost_synchro/reference/lockers.html
+boost_synchro/reference/single_threaded.html
+boost_synchro/reference/multi_threaded.html
+boost_synchro/reference/multi_process.html
+boost_synchro/reference/polymorphic_locks.html
+boost_synchro/reference/other.html
+boost_synchro/reference/high_level.html
+boost_synchro/examples.html
+boost_synchro/appendices.html
+boost_synchro/appendices/history.html
+boost_synchro/appendices/rationale.html
+boost_synchro/appendices/implementation.html
+boost_synchro/appendices/acknowledgements.html
+boost_synchro/appendices/appendix_e__tests.html
+boost_synchro/appendices/appendix_f__tickets.html
+boost_synchro/appendices/todo.html

Modified: sandbox/synchro/libs/synchro/test/Jamfile.v2
==============================================================================
--- sandbox/synchro/libs/synchro/test/Jamfile.v2 (original)
+++ sandbox/synchro/libs/synchro/test/Jamfile.v2 2009-10-12 17:49:35 EDT (Mon, 12 Oct 2009)
@@ -31,10 +31,10 @@
         #<library>/boost/test//boost_unit_test_framework/<link>static
         #<library>/boost/thread//boost_thread/<link>static
         
- <library>/boost_1_39_0/libs/test/build//boost_unit_test_framework/<link>static
- <library>/boost_1_39_0/libs/thread/build//boost_thread/<link>static
+ <library>/boost/test//boost_unit_test_framework/<link>static
+ <library>/boost/thread//boost_thread/<link>static
         <library>/sandbox/chrono/libs/chrono/build//boost_chrono/<link>static
- <library>/boost_1_39_0/libs/system/build//boost_system/<link>static
+ <library>/boost/system//boost_system/<link>static
       
 ;
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk