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.

154 lines
11 KiB

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
  3. <title>tbb::deprecated::concurrent_queue&lt; T, A &gt; Class Template Reference</title>
  4. <link href="doxygen.css" rel="stylesheet" type="text/css">
  5. <link href="tabs.css" rel="stylesheet" type="text/css">
  6. </head><body>
  7. <!-- Generated by Doxygen 1.4.7 -->
  8. <div class="tabs">
  9. <ul>
  10. <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
  11. <li><a href="modules.html"><span>Modules</span></a></li>
  12. <li><a href="namespaces.html"><span>Namespaces</span></a></li>
  13. <li id="current"><a href="annotated.html"><span>Classes</span></a></li>
  14. <li><a href="files.html"><span>Files</span></a></li>
  15. <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  16. </ul></div>
  17. <div class="tabs">
  18. <ul>
  19. <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
  20. <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
  21. <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
  22. </ul></div>
  23. <div class="nav">
  24. <a class="el" href="a00428.html">tbb</a>::<b>deprecated</b>::<a class="el" href="a00287.html">concurrent_queue</a></div>
  25. <h1>tbb::deprecated::concurrent_queue&lt; T, A &gt; Class Template Reference<br>
  26. <small>
  27. [<a class="el" href="a00442.html">Containers</a>]</small>
  28. </h1><!-- doxytag: class="tbb::deprecated::concurrent_queue" --><!-- doxytag: inherits="tbb::concurrent_bounded_queue" -->A high-performance thread-safe blocking concurrent bounded queue.
  29. <a href="#_details">More...</a>
  30. <p>
  31. <code>#include &lt;concurrent_queue.h&gt;</code>
  32. <p>
  33. <p>Inheritance diagram for tbb::deprecated::concurrent_queue&lt; T, A &gt;:
  34. <p><center><img src="a00287.png" usemap="#tbb::deprecated::concurrent_queue< T, A >_map" border="0" alt=""></center>
  35. <map name="tbb::deprecated::concurrent_queue< T, A >_map">
  36. <area href="a00280.html" alt="tbb::concurrent_bounded_queue< T, A >" shape="rect" coords="0,0,257,24">
  37. </map>
  38. <a href="a00038.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
  39. <tr><td></td></tr>
  40. <tr><td colspan="2"><br><h2>Public Types</h2></td></tr>
  41. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8861a9cdf232a20b5f2569754a281871"></a><!-- doxytag: member="tbb::deprecated::concurrent_queue::iterator" ref="8861a9cdf232a20b5f2569754a281871" args="" -->
  42. typedef <a class="el" href="a00280.html">concurrent_bounded_queue</a>&lt;<br>
  43. T, A &gt;::iterator&nbsp;</td><td class="memItemRight" valign="bottom"><b>iterator</b></td></tr>
  44. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7117842ce3ed7c5147d3c886922e64d0"></a><!-- doxytag: member="tbb::deprecated::concurrent_queue::const_iterator" ref="7117842ce3ed7c5147d3c886922e64d0" args="" -->
  45. typedef <a class="el" href="a00280.html">concurrent_bounded_queue</a>&lt;<br>
  46. T, A &gt;::const_iterator&nbsp;</td><td class="memItemRight" valign="bottom"><b>const_iterator</b></td></tr>
  47. <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
  48. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="aaf19bd7337b72f3131ece60f7315ef7"></a><!-- doxytag: member="tbb::deprecated::concurrent_queue::concurrent_queue" ref="aaf19bd7337b72f3131ece60f7315ef7" args="(const A &amp;a=A())" -->
  49. &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00287.html#aaf19bd7337b72f3131ece60f7315ef7">concurrent_queue</a> (const A &amp;a=A())</td></tr>
  50. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Construct empty queue. <br></td></tr>
  51. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fc092b9082f233482f3513fc3bb670f7"></a><!-- doxytag: member="tbb::deprecated::concurrent_queue::concurrent_queue" ref="fc092b9082f233482f3513fc3bb670f7" args="(const concurrent_queue &amp;src, const A &amp;a=A())" -->
  52. &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00287.html#fc092b9082f233482f3513fc3bb670f7">concurrent_queue</a> (const <a class="el" href="a00287.html">concurrent_queue</a> &amp;src, const A &amp;a=A())</td></tr>
  53. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Copy constructor. <br></td></tr>
  54. <tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="9102b897776bd2d9e908e6604ff16b5f"></a><!-- doxytag: member="tbb::deprecated::concurrent_queue::concurrent_queue" ref="9102b897776bd2d9e908e6604ff16b5f" args="(InputIterator b, InputIterator e, const A &amp;a=A())" -->
  55. template&lt;typename InputIterator&gt; </td></tr>
  56. <tr><td class="memTemplItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00287.html#9102b897776bd2d9e908e6604ff16b5f">concurrent_queue</a> (InputIterator b, InputIterator e, const A &amp;a=A())</td></tr>
  57. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">[begin,end) constructor <br></td></tr>
  58. <tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00287.html#7c45561bafe71107d09b2bc1b8f4e681">push_if_not_full</a> (const T &amp;source)</td></tr>
  59. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Enqueue an item at tail of queue if queue is not already full. <a href="#7c45561bafe71107d09b2bc1b8f4e681"></a><br></td></tr>
  60. <tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00287.html#48da3536245318af6cb5fd58bac78039">pop_if_present</a> (T &amp;destination)</td></tr>
  61. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attempt to dequeue an item from head of queue. <a href="#48da3536245318af6cb5fd58bac78039"></a><br></td></tr>
  62. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ed7202cd273ae36463e6ac57e9472670"></a><!-- doxytag: member="tbb::deprecated::concurrent_queue::begin" ref="ed7202cd273ae36463e6ac57e9472670" args="()" -->
  63. iterator&nbsp;</td><td class="memItemRight" valign="bottom"><b>begin</b> ()</td></tr>
  64. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="35fbb0d7e135545eb1daec2b4ae894cd"></a><!-- doxytag: member="tbb::deprecated::concurrent_queue::end" ref="35fbb0d7e135545eb1daec2b4ae894cd" args="()" -->
  65. iterator&nbsp;</td><td class="memItemRight" valign="bottom"><b>end</b> ()</td></tr>
  66. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="62f31fe653e1158e64ddb0e163d0335c"></a><!-- doxytag: member="tbb::deprecated::concurrent_queue::begin" ref="62f31fe653e1158e64ddb0e163d0335c" args="() const " -->
  67. const_iterator&nbsp;</td><td class="memItemRight" valign="bottom"><b>begin</b> () const </td></tr>
  68. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3d42ddc4a6fe42350750a930302863d1"></a><!-- doxytag: member="tbb::deprecated::concurrent_queue::end" ref="3d42ddc4a6fe42350750a930302863d1" args="() const " -->
  69. const_iterator&nbsp;</td><td class="memItemRight" valign="bottom"><b>end</b> () const </td></tr>
  70. <tr><td colspan="2"><br><h2>Friends</h2></td></tr>
  71. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="05bffad9626d51abbd4bb82ae2a1cceb"></a><!-- doxytag: member="tbb::deprecated::concurrent_queue::internal::concurrent_queue_iterator" ref="05bffad9626d51abbd4bb82ae2a1cceb" args="" -->
  72. class&nbsp;</td><td class="memItemRight" valign="bottom"><b>internal::concurrent_queue_iterator</b></td></tr>
  73. </table>
  74. <hr><a name="_details"></a><h2>Detailed Description</h2>
  75. <h3>template&lt;typename T, class A = cache_aligned_allocator&lt;T&gt;&gt;<br>
  76. class tbb::deprecated::concurrent_queue&lt; T, A &gt;</h3>
  77. A high-performance thread-safe blocking concurrent bounded queue.
  78. <p>
  79. This is the pre-PPL TBB concurrent queue which support boundedness and blocking semantics. Note that method names agree with the PPL-style concurrent queue. Multiple threads may each push and pop concurrently. Assignment construction is not allowed.
  80. <p>
  81. <hr><h2>Member Function Documentation</h2>
  82. <a class="anchor" name="48da3536245318af6cb5fd58bac78039"></a><!-- doxytag: member="tbb::deprecated::concurrent_queue::pop_if_present" ref="48da3536245318af6cb5fd58bac78039" args="(T &amp;destination)" -->
  83. <div class="memitem">
  84. <div class="memproto">
  85. <div class="memtemplate">
  86. template&lt;typename T, class A = cache_aligned_allocator&lt;T&gt;&gt; </div>
  87. <table class="memname">
  88. <tr>
  89. <td class="memname">bool <a class="el" href="a00287.html">tbb::deprecated::concurrent_queue</a>&lt; T, A &gt;::pop_if_present </td>
  90. <td>(</td>
  91. <td class="paramtype">T &amp;&nbsp;</td>
  92. <td class="paramname"> <em>destination</em> </td>
  93. <td>&nbsp;)&nbsp;</td>
  94. <td width="100%"><code> [inline]</code></td>
  95. </tr>
  96. </table>
  97. </div>
  98. <div class="memdoc">
  99. <p>
  100. Attempt to dequeue an item from head of queue.
  101. <p>
  102. Does not wait for item to become available. Returns true if successful; false otherwise. <dl compact><dt><b><a class="el" href="deprecated.html#_deprecated000001">Deprecated:</a></b></dt><dd>Use <a class="el" href="a00280.html#0ca487019bbb00a196442aff78a1e4f7">try_pop()</a> </dd></dl>
  103. </div>
  104. </div><p>
  105. <a class="anchor" name="7c45561bafe71107d09b2bc1b8f4e681"></a><!-- doxytag: member="tbb::deprecated::concurrent_queue::push_if_not_full" ref="7c45561bafe71107d09b2bc1b8f4e681" args="(const T &amp;source)" -->
  106. <div class="memitem">
  107. <div class="memproto">
  108. <div class="memtemplate">
  109. template&lt;typename T, class A = cache_aligned_allocator&lt;T&gt;&gt; </div>
  110. <table class="memname">
  111. <tr>
  112. <td class="memname">bool <a class="el" href="a00287.html">tbb::deprecated::concurrent_queue</a>&lt; T, A &gt;::push_if_not_full </td>
  113. <td>(</td>
  114. <td class="paramtype">const T &amp;&nbsp;</td>
  115. <td class="paramname"> <em>source</em> </td>
  116. <td>&nbsp;)&nbsp;</td>
  117. <td width="100%"><code> [inline]</code></td>
  118. </tr>
  119. </table>
  120. </div>
  121. <div class="memdoc">
  122. <p>
  123. Enqueue an item at tail of queue if queue is not already full.
  124. <p>
  125. Does not wait for queue to become not full. Returns true if item is pushed; false if queue was already full.
  126. </div>
  127. </div><p>
  128. <hr>The documentation for this class was generated from the following file:<ul>
  129. <li>concurrent_queue.h</ul>
  130. <hr>
  131. <p></p>
  132. Copyright &copy; 2005-2013 Intel Corporation. All Rights Reserved.
  133. <p></p>
  134. Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are
  135. registered trademarks or trademarks of Intel Corporation or its
  136. subsidiaries in the United States and other countries.
  137. <p></p>
  138. * Other names and brands may be claimed as the property of others.