/usr/share/doc/libjuce/apiref/classReadWriteLock.html is in libjuce-doc 4.3.0~repack-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 | <!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.12"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>JUCE: ReadWriteLock 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="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.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! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">JUCE
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.12 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> |
<a href="classReadWriteLock-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">ReadWriteLock Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>A critical section that allows multiple simultaneous readers.
<a href="classReadWriteLock.html#details">More...</a></p>
<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:ac4d03ea1fd3a24c1813492b8487134af"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classReadWriteLock.html#ac4d03ea1fd3a24c1813492b8487134af">ReadWriteLock</a> () noexcept</td></tr>
<tr class="memdesc:ac4d03ea1fd3a24c1813492b8487134af"><td class="mdescLeft"> </td><td class="mdescRight">Creates a <a class="el" href="classReadWriteLock.html" title="A critical section that allows multiple simultaneous readers. ">ReadWriteLock</a> object. <a href="#ac4d03ea1fd3a24c1813492b8487134af">More...</a><br /></td></tr>
<tr class="separator:ac4d03ea1fd3a24c1813492b8487134af"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af57fd41f09be7654f33cc0e4aa458e5a"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classReadWriteLock.html#af57fd41f09be7654f33cc0e4aa458e5a">~ReadWriteLock</a> () noexcept</td></tr>
<tr class="memdesc:af57fd41f09be7654f33cc0e4aa458e5a"><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <a href="#af57fd41f09be7654f33cc0e4aa458e5a">More...</a><br /></td></tr>
<tr class="separator:af57fd41f09be7654f33cc0e4aa458e5a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae69612d80a6abdccfd0f911eea78bec7"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classReadWriteLock.html#ae69612d80a6abdccfd0f911eea78bec7">enterRead</a> () const noexcept</td></tr>
<tr class="memdesc:ae69612d80a6abdccfd0f911eea78bec7"><td class="mdescLeft"> </td><td class="mdescRight">Locks this object for reading. <a href="#ae69612d80a6abdccfd0f911eea78bec7">More...</a><br /></td></tr>
<tr class="separator:ae69612d80a6abdccfd0f911eea78bec7"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:adfc94e3cea69acf123d343eca82bdc51"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classReadWriteLock.html#adfc94e3cea69acf123d343eca82bdc51">tryEnterRead</a> () const noexcept</td></tr>
<tr class="memdesc:adfc94e3cea69acf123d343eca82bdc51"><td class="mdescLeft"> </td><td class="mdescRight">Tries to lock this object for reading. <a href="#adfc94e3cea69acf123d343eca82bdc51">More...</a><br /></td></tr>
<tr class="separator:adfc94e3cea69acf123d343eca82bdc51"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4f84fd4d0560d01674922e650c0ca4bc"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classReadWriteLock.html#a4f84fd4d0560d01674922e650c0ca4bc">exitRead</a> () const noexcept</td></tr>
<tr class="memdesc:a4f84fd4d0560d01674922e650c0ca4bc"><td class="mdescLeft"> </td><td class="mdescRight">Releases the read-lock. <a href="#a4f84fd4d0560d01674922e650c0ca4bc">More...</a><br /></td></tr>
<tr class="separator:a4f84fd4d0560d01674922e650c0ca4bc"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a680913272878d262ab8dff16b3b5a4e7"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classReadWriteLock.html#a680913272878d262ab8dff16b3b5a4e7">enterWrite</a> () const noexcept</td></tr>
<tr class="memdesc:a680913272878d262ab8dff16b3b5a4e7"><td class="mdescLeft"> </td><td class="mdescRight">Locks this object for writing. <a href="#a680913272878d262ab8dff16b3b5a4e7">More...</a><br /></td></tr>
<tr class="separator:a680913272878d262ab8dff16b3b5a4e7"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac7f0b0aefca34943957ac1623b97a8a2"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classReadWriteLock.html#ac7f0b0aefca34943957ac1623b97a8a2">tryEnterWrite</a> () const noexcept</td></tr>
<tr class="memdesc:ac7f0b0aefca34943957ac1623b97a8a2"><td class="mdescLeft"> </td><td class="mdescRight">Tries to lock this object for writing. <a href="#ac7f0b0aefca34943957ac1623b97a8a2">More...</a><br /></td></tr>
<tr class="separator:ac7f0b0aefca34943957ac1623b97a8a2"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3368936be01cf4eb129838230098abe8"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classReadWriteLock.html#a3368936be01cf4eb129838230098abe8">exitWrite</a> () const noexcept</td></tr>
<tr class="memdesc:a3368936be01cf4eb129838230098abe8"><td class="mdescLeft"> </td><td class="mdescRight">Releases the write-lock. <a href="#a3368936be01cf4eb129838230098abe8">More...</a><br /></td></tr>
<tr class="separator:a3368936be01cf4eb129838230098abe8"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A critical section that allows multiple simultaneous readers. </p>
<p>Features of this type of lock are:</p>
<ul>
<li>Multiple readers can hold the lock at the same time, but only one writer can hold it at once.</li>
<li>Writers trying to gain the lock will be blocked until all readers and writers have released it</li>
<li>Readers trying to gain the lock while a writer is waiting to acquire it will be blocked until the writer has obtained and released it</li>
<li>If a thread already has a read lock and tries to obtain a write lock, it will succeed if there are no other readers</li>
<li>If a thread already has the write lock and tries to obtain a read lock, this will succeed.</li>
<li>Recursive locking is supported.</li>
</ul>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classScopedReadLock.html" title="Automatically locks and unlocks a ReadWriteLock object. ">ScopedReadLock</a>, <a class="el" href="classScopedWriteLock.html" title="Automatically locks and unlocks a ReadWriteLock object. ">ScopedWriteLock</a>, <a class="el" href="classCriticalSection.html" title="A re-entrant mutex. ">CriticalSection</a> </dd></dl>
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
<a id="ac4d03ea1fd3a24c1813492b8487134af"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac4d03ea1fd3a24c1813492b8487134af">§ </a></span>ReadWriteLock()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">ReadWriteLock::ReadWriteLock </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Creates a <a class="el" href="classReadWriteLock.html" title="A critical section that allows multiple simultaneous readers. ">ReadWriteLock</a> object. </p>
</div>
</div>
<a id="af57fd41f09be7654f33cc0e4aa458e5a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af57fd41f09be7654f33cc0e4aa458e5a">§ </a></span>~ReadWriteLock()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">ReadWriteLock::~ReadWriteLock </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Destructor. </p>
<p>If the object is deleted whilst locked, any subsequent behaviour is undefined. </p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="ae69612d80a6abdccfd0f911eea78bec7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae69612d80a6abdccfd0f911eea78bec7">§ </a></span>enterRead()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void ReadWriteLock::enterRead </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Locks this object for reading. </p>
<p>Multiple threads can simultaneously lock the object for reading, but if another thread has it locked for writing, then this will block until it releases the lock.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classReadWriteLock.html#a4f84fd4d0560d01674922e650c0ca4bc" title="Releases the read-lock. ">exitRead</a>, <a class="el" href="classScopedReadLock.html" title="Automatically locks and unlocks a ReadWriteLock object. ">ScopedReadLock</a> </dd></dl>
</div>
</div>
<a id="adfc94e3cea69acf123d343eca82bdc51"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adfc94e3cea69acf123d343eca82bdc51">§ </a></span>tryEnterRead()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool ReadWriteLock::tryEnterRead </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Tries to lock this object for reading. </p>
<p>Multiple threads can simultaneously lock the object for reading, but if another thread has it locked for writing, then this will fail and return false.</p>
<dl class="section return"><dt>Returns</dt><dd>true if the lock is successfully gained. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classReadWriteLock.html#a4f84fd4d0560d01674922e650c0ca4bc" title="Releases the read-lock. ">exitRead</a>, <a class="el" href="classScopedReadLock.html" title="Automatically locks and unlocks a ReadWriteLock object. ">ScopedReadLock</a> </dd></dl>
</div>
</div>
<a id="a4f84fd4d0560d01674922e650c0ca4bc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4f84fd4d0560d01674922e650c0ca4bc">§ </a></span>exitRead()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void ReadWriteLock::exitRead </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Releases the read-lock. </p>
<p>If the caller thread hasn't got the lock, this can have unpredictable results.</p>
<p>If the <a class="el" href="classReadWriteLock.html#ae69612d80a6abdccfd0f911eea78bec7" title="Locks this object for reading. ">enterRead()</a> method has been called multiple times by the thread, each call must be matched by a call to <a class="el" href="classReadWriteLock.html#a4f84fd4d0560d01674922e650c0ca4bc" title="Releases the read-lock. ">exitRead()</a> before other threads will be allowed to take over the lock.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classReadWriteLock.html#ae69612d80a6abdccfd0f911eea78bec7" title="Locks this object for reading. ">enterRead</a>, <a class="el" href="classScopedReadLock.html" title="Automatically locks and unlocks a ReadWriteLock object. ">ScopedReadLock</a> </dd></dl>
</div>
</div>
<a id="a680913272878d262ab8dff16b3b5a4e7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a680913272878d262ab8dff16b3b5a4e7">§ </a></span>enterWrite()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void ReadWriteLock::enterWrite </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Locks this object for writing. </p>
<p>This will block until any other threads that have it locked for reading or writing have released their lock.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classReadWriteLock.html#a3368936be01cf4eb129838230098abe8" title="Releases the write-lock. ">exitWrite</a>, <a class="el" href="classScopedWriteLock.html" title="Automatically locks and unlocks a ReadWriteLock object. ">ScopedWriteLock</a> </dd></dl>
</div>
</div>
<a id="ac7f0b0aefca34943957ac1623b97a8a2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac7f0b0aefca34943957ac1623b97a8a2">§ </a></span>tryEnterWrite()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool ReadWriteLock::tryEnterWrite </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Tries to lock this object for writing. </p>
<p>This is like <a class="el" href="classReadWriteLock.html#a680913272878d262ab8dff16b3b5a4e7" title="Locks this object for writing. ">enterWrite()</a>, but doesn't block - it returns true if it manages to obtain the lock.</p>
<dl class="section return"><dt>Returns</dt><dd>true if the lock is successfully gained. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classReadWriteLock.html#a680913272878d262ab8dff16b3b5a4e7" title="Locks this object for writing. ">enterWrite</a> </dd></dl>
</div>
</div>
<a id="a3368936be01cf4eb129838230098abe8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3368936be01cf4eb129838230098abe8">§ </a></span>exitWrite()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void ReadWriteLock::exitWrite </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Releases the write-lock. </p>
<p>If the caller thread hasn't got the lock, this can have unpredictable results.</p>
<p>If the <a class="el" href="classReadWriteLock.html#a680913272878d262ab8dff16b3b5a4e7" title="Locks this object for writing. ">enterWrite()</a> method has been called multiple times by the thread, each call must be matched by a call to exit() before other threads will be allowed to take over the lock.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classReadWriteLock.html#a680913272878d262ab8dff16b3b5a4e7" title="Locks this object for writing. ">enterWrite</a>, <a class="el" href="classScopedWriteLock.html" title="Automatically locks and unlocks a ReadWriteLock object. ">ScopedWriteLock</a> </dd></dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="juce__ReadWriteLock_8h.html">juce_ReadWriteLock.h</a></li>
</ul>
</div><!-- contents -->
<hr class="footer"/>
<address class="footer"><small>All content © ROLI Ltd.</small></address><br/>
</body>
</html>
|