scoped_lock.html 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <html>
  2. <head>
  3. <title>Scoped Lock</title>
  4. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  5. <link rel="stylesheet" href="theme/style.css" type="text/css">
  6. </head>
  7. <body>
  8. <table width="100%" border="0" background="theme/bkd2.gif" cellspacing="2">
  9. <tr>
  10. <td width="10">
  11. </td>
  12. <td width="85%"> <font size="6" face="Verdana, Arial, Helvetica, sans-serif"><b>Scoped
  13. Lock</b></font></td>
  14. <td width="112"><a href="http://spirit.sf.net"><img src="theme/spirit.gif" width="112" height="48" align="right" border="0"></a></td>
  15. </tr>
  16. </table>
  17. <br>
  18. <table border="0">
  19. <tr>
  20. <td width="10"></td>
  21. <td width="30"><a href="../index.html"><img src="theme/u_arr.gif" border="0"></a></td>
  22. <td width="30"><a href="regular_expression_parser.html"><img src="theme/l_arr.gif" border="0"></a></td>
  23. <td width="30"><a href="distinct.html"><img src="theme/r_arr.gif" border="0"></a></td>
  24. </tr>
  25. </table>
  26. <h2>scoped_lock_d</h2>
  27. <p>The <tt>scoped_lock_d</tt> directive constructs a parser that locks a mutex
  28. during the attempt to match the contained parser.</p>
  29. <p>Syntax:</p>
  30. <pre> <span class="identifier">scoped_lock_d</span><span class="special">(</span>mutex<span class="special">&amp;)[</span>body-parser<span class="special">]</span></pre>
  31. <p>Note, that nesting <tt>scoped_lock_d</tt> directives bears the risk of deadlocks
  32. since the order of locking depends on the grammar used and may even depend on
  33. the input being parsed. Locking order has to be consistent within an application
  34. to ensure deadlock free operation.</p>
  35. <p></p>
  36. <table border="0">
  37. <tr>
  38. <td width="10"></td>
  39. <td width="30"><a href="../index.html"><img src="theme/u_arr.gif" border="0"></a></td>
  40. <td width="30"><a href="regular_expression_parser.html"><img src="theme/l_arr.gif" border="0"></a></td>
  41. <td width="30"><a href="distinct.html"><img src="theme/r_arr.gif" border="0"></a></td>
  42. </tr>
  43. </table>
  44. <br>
  45. <hr size="1">
  46. <p class="copyright">Copyright &copy; 2003 Martin Wille<br>
  47. <br>
  48. <font size="2">Use, modification and distribution is subject to the Boost Software
  49. License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  50. http://www.boost.org/LICENSE_1_0.txt)</font></p>
  51. <p class="copyright">&nbsp;</p>
  52. </body>
  53. </html>