You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.4"/> <title>tbb::mutex::scoped_lock Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <!-- end header part --> <!-- Generated by Doxygen 1.8.4 --> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="a00222.html">tbb</a></li><li class="navelem"><a class="el" href="a00081.html">mutex</a></li><li class="navelem"><a class="el" href="a00116.html">scoped_lock</a></li> </ul> </div> </div><!-- top --> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> | <a href="#friends">Friends</a> | <a href="a00259.html">List of all members</a> </div> <div class="headertitle"> <div class="title">tbb::mutex::scoped_lock Class Reference</div> </div> </div><!--header--> <div class="contents">
<p>The scoped locking pattern. <a href="a00116.html#details">More...</a></p>
<p><code>#include <mutex.h></code></p> <div class="dynheader"> Inheritance diagram for tbb::mutex::scoped_lock:</div> <div class="dyncontent"> <div class="center"> <img src="a00116.png" usemap="#tbb::mutex::scoped_lock_map" alt=""/> <map id="tbb::mutex::scoped_lock_map" name="tbb::mutex::scoped_lock_map"> </map> </div></div> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a> Public Member Functions</h2></td></tr> <tr class="memitem:a23122745ccd5fc2498fcbbd5ced09e06"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a23122745ccd5fc2498fcbbd5ced09e06"></a>  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00116.html#a23122745ccd5fc2498fcbbd5ced09e06">scoped_lock</a> ()</td></tr> <tr class="memdesc:a23122745ccd5fc2498fcbbd5ced09e06"><td class="mdescLeft"> </td><td class="mdescRight">Construct lock that has not acquired a mutex. <br/></td></tr> <tr class="separator:a23122745ccd5fc2498fcbbd5ced09e06"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ab7c2074543443824790433d3d6c3fece"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab7c2074543443824790433d3d6c3fece"></a>  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00116.html#ab7c2074543443824790433d3d6c3fece">scoped_lock</a> (<a class="el" href="a00081.html">mutex</a> &<a class="el" href="a00081.html">mutex</a>)</td></tr> <tr class="memdesc:ab7c2074543443824790433d3d6c3fece"><td class="mdescLeft"> </td><td class="mdescRight">Acquire lock on given mutex. <br/></td></tr> <tr class="separator:ab7c2074543443824790433d3d6c3fece"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a08c399ee0bb9762039b29e570ec46fe9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a08c399ee0bb9762039b29e570ec46fe9"></a>  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00116.html#a08c399ee0bb9762039b29e570ec46fe9">~scoped_lock</a> ()</td></tr> <tr class="memdesc:a08c399ee0bb9762039b29e570ec46fe9"><td class="mdescLeft"> </td><td class="mdescRight">Release lock (if lock is held). <br/></td></tr> <tr class="separator:a08c399ee0bb9762039b29e570ec46fe9"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a9fce3e2e9f592315dc9c1ada72ae5e3c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9fce3e2e9f592315dc9c1ada72ae5e3c"></a> void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00116.html#a9fce3e2e9f592315dc9c1ada72ae5e3c">acquire</a> (<a class="el" href="a00081.html">mutex</a> &<a class="el" href="a00081.html">mutex</a>)</td></tr> <tr class="memdesc:a9fce3e2e9f592315dc9c1ada72ae5e3c"><td class="mdescLeft"> </td><td class="mdescRight">Acquire lock on given mutex. <br/></td></tr> <tr class="separator:a9fce3e2e9f592315dc9c1ada72ae5e3c"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a46f983371aa852d2427ce69f9a571f78"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a46f983371aa852d2427ce69f9a571f78"></a> bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00116.html#a46f983371aa852d2427ce69f9a571f78">try_acquire</a> (<a class="el" href="a00081.html">mutex</a> &<a class="el" href="a00081.html">mutex</a>)</td></tr> <tr class="memdesc:a46f983371aa852d2427ce69f9a571f78"><td class="mdescLeft"> </td><td class="mdescRight">Try acquire lock on given mutex. <br/></td></tr> <tr class="separator:a46f983371aa852d2427ce69f9a571f78"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a1a1590281ccca912229a689d920fd78a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1a1590281ccca912229a689d920fd78a"></a> void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00116.html#a1a1590281ccca912229a689d920fd78a">release</a> ()</td></tr> <tr class="memdesc:a1a1590281ccca912229a689d920fd78a"><td class="mdescLeft"> </td><td class="mdescRight">Release lock. <br/></td></tr> <tr class="separator:a1a1590281ccca912229a689d920fd78a"><td class="memSeparator" colspan="2"> </td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a> Friends</h2></td></tr> <tr class="memitem:a6f4535025b9df015e1a7d35f4e2bbee7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6f4535025b9df015e1a7d35f4e2bbee7"></a> class </td><td class="memItemRight" valign="bottom"><b>mutex</b></td></tr> <tr class="separator:a6f4535025b9df015e1a7d35f4e2bbee7"><td class="memSeparator" colspan="2"> </td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <div class="textblock"><p>The scoped locking pattern. </p> <p>It helps to avoid the common problem of forgetting to release lock. It also nicely provides the "node" for queuing locks. </p> </div><hr/>The documentation for this class was generated from the following file:<ul> <li>mutex.h</li> </ul> </div><!-- contents --> <hr> <p></p> Copyright © 2005-2014 Intel Corporation. All Rights Reserved. <p></p> Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its subsidiaries in the United States and other countries. <p></p> * Other names and brands may be claimed as the property of others.
|