blob: d3eae09a577b8b4951bebd6b07f4edc00591239c [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>tbb::concurrent_bounded_queue&lt; T, A &gt; Class Template Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.7 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li id="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
</ul></div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
<li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
</ul></div>
<div class="nav">
<a class="el" href="a00267.html">tbb</a>::<a class="el" href="a00155.html">concurrent_bounded_queue</a></div>
<h1>tbb::concurrent_bounded_queue&lt; T, A &gt; Class Template Reference<br>
<small>
[<a class="el" href="a00275.html">Containers</a>]</small>
</h1><!-- doxytag: class="tbb::concurrent_bounded_queue" -->A high-performance thread-safe blocking concurrent bounded queue.
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="a00335.html">concurrent_queue.h</a>&gt;</code>
<p>
<p>Inheritance diagram for tbb::concurrent_bounded_queue&lt; T, A &gt;:
<p><center><img src="a00155.png" usemap="#tbb::concurrent_bounded_queue< T, A >_map" border="0" alt=""></center>
<map name="tbb::concurrent_bounded_queue< T, A >_map">
<area href="a00161.html" alt="tbb::deprecated::concurrent_queue< T, A >" shape="rect" coords="0,56,257,80">
</map>
<a href="a00019.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Types</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="98245517a931e5893f6601e66c51fc75"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::value_type" ref="98245517a931e5893f6601e66c51fc75" args="" -->
typedef T&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00155.html#98245517a931e5893f6601e66c51fc75">value_type</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Element type in the queue. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2e2726fccf6d975dc1071608cc0bbf90"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::allocator_type" ref="2e2726fccf6d975dc1071608cc0bbf90" args="" -->
typedef A&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00155.html#2e2726fccf6d975dc1071608cc0bbf90">allocator_type</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Allocator type. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="dcd44ca6a88c0dc7a847a47a10811f0c"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::reference" ref="dcd44ca6a88c0dc7a847a47a10811f0c" args="" -->
typedef T &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00155.html#dcd44ca6a88c0dc7a847a47a10811f0c">reference</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Reference type. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="796713d0b9ba93a4721cbe13e4474068"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::const_reference" ref="796713d0b9ba93a4721cbe13e4474068" args="" -->
typedef const T &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00155.html#796713d0b9ba93a4721cbe13e4474068">const_reference</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Const reference type. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef std::ptrdiff_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00155.html#a80e4c11dbb324e4b92a24a77bbcde68">size_type</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Integral type for representing size of the queue. <a href="#a80e4c11dbb324e4b92a24a77bbcde68"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4b45c91297e69515d83d5eef85ae1f49"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::difference_type" ref="4b45c91297e69515d83d5eef85ae1f49" args="" -->
typedef std::ptrdiff_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00155.html#4b45c91297e69515d83d5eef85ae1f49">difference_type</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Difference type for iterator. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="aeea2ad38b7e7fc2866f063dfed24c52"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::iterator" ref="aeea2ad38b7e7fc2866f063dfed24c52" args="" -->
typedef internal::concurrent_queue_iterator&lt;<br>
<a class="el" href="a00155.html">concurrent_bounded_queue</a>,<br>
T &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><b>iterator</b></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0edd1a90e6ffa503bac1c4027116dbff"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::const_iterator" ref="0edd1a90e6ffa503bac1c4027116dbff" args="" -->
typedef internal::concurrent_queue_iterator&lt;<br>
<a class="el" href="a00155.html">concurrent_bounded_queue</a>,<br>
const T &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><b>const_iterator</b></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e3525226732963ff0f13e89d8e6dab5b"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::concurrent_bounded_queue" ref="e3525226732963ff0f13e89d8e6dab5b" args="(const allocator_type &amp;a=allocator_type())" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00155.html#e3525226732963ff0f13e89d8e6dab5b">concurrent_bounded_queue</a> (const <a class="el" href="a00155.html#2e2726fccf6d975dc1071608cc0bbf90">allocator_type</a> &amp;a=<a class="el" href="a00155.html#2e2726fccf6d975dc1071608cc0bbf90">allocator_type</a>())</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Construct empty queue. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7b7fb414d2eaa8a7f5d68fc4cd63ac50"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::concurrent_bounded_queue" ref="7b7fb414d2eaa8a7f5d68fc4cd63ac50" args="(const concurrent_bounded_queue &amp;src, const allocator_type &amp;a=allocator_type())" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00155.html#7b7fb414d2eaa8a7f5d68fc4cd63ac50">concurrent_bounded_queue</a> (const <a class="el" href="a00155.html">concurrent_bounded_queue</a> &amp;src, const <a class="el" href="a00155.html#2e2726fccf6d975dc1071608cc0bbf90">allocator_type</a> &amp;a=<a class="el" href="a00155.html#2e2726fccf6d975dc1071608cc0bbf90">allocator_type</a>())</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Copy constructor. <br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="a5e04dcd7db9fd9b583b4e7df832246a"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::concurrent_bounded_queue" ref="a5e04dcd7db9fd9b583b4e7df832246a" args="(InputIterator begin, InputIterator end, const allocator_type &amp;a=allocator_type())" -->
template&lt;typename InputIterator&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00155.html#a5e04dcd7db9fd9b583b4e7df832246a">concurrent_bounded_queue</a> (InputIterator begin, InputIterator end, const <a class="el" href="a00155.html#2e2726fccf6d975dc1071608cc0bbf90">allocator_type</a> &amp;a=<a class="el" href="a00155.html#2e2726fccf6d975dc1071608cc0bbf90">allocator_type</a>())</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">[begin,end) constructor <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="acaf5b510dc0dfc7780b8c956cf773cf"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::~concurrent_bounded_queue" ref="acaf5b510dc0dfc7780b8c956cf773cf" args="()" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00155.html#acaf5b510dc0dfc7780b8c956cf773cf">~concurrent_bounded_queue</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destroy queue. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ceb08c743b11ba88c878e73fff8af20b"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::push" ref="ceb08c743b11ba88c878e73fff8af20b" args="(const T &amp;source)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00155.html#ceb08c743b11ba88c878e73fff8af20b">push</a> (const T &amp;source)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Enqueue an item at tail of queue. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00155.html#41f4c6bd7a82ab070e840bbf81b0b123">pop</a> (T &amp;destination)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Dequeue item from head of queue. <a href="#41f4c6bd7a82ab070e840bbf81b0b123"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00155.html#2bd6232531279fb3ccbd296bea23066b">try_push</a> (const T &amp;source)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Enqueue an item at tail of queue if queue is not already full. <a href="#2bd6232531279fb3ccbd296bea23066b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00155.html#0ca487019bbb00a196442aff78a1e4f7">try_pop</a> (T &amp;destination)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attempt to dequeue an item from head of queue. <a href="#0ca487019bbb00a196442aff78a1e4f7"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="a00155.html#a80e4c11dbb324e4b92a24a77bbcde68">size_type</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00155.html#7dc14d1a579a4cccda9f857585e1768d">size</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return number of pushes minus number of pops. <a href="#7dc14d1a579a4cccda9f857585e1768d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f64924f2ee9225c368a270fc3c394db9"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::empty" ref="f64924f2ee9225c368a270fc3c394db9" args="() const " -->
bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00155.html#f64924f2ee9225c368a270fc3c394db9">empty</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Equivalent to <a class="el" href="a00155.html#7dc14d1a579a4cccda9f857585e1768d">size()</a>&lt;=0. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b2888b3e4e837d7e03f2c731963a402b"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::capacity" ref="b2888b3e4e837d7e03f2c731963a402b" args="() const " -->
<a class="el" href="a00155.html#a80e4c11dbb324e4b92a24a77bbcde68">size_type</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00155.html#b2888b3e4e837d7e03f2c731963a402b">capacity</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Maximum number of allowed elements. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00155.html#f3c6c934f85fd02aedbc83a16943193b">set_capacity</a> (<a class="el" href="a00155.html#a80e4c11dbb324e4b92a24a77bbcde68">size_type</a> new_capacity)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the capacity. <a href="#f3c6c934f85fd02aedbc83a16943193b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="415eb87e53b1c6a266de06ecbc490d16"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::get_allocator" ref="415eb87e53b1c6a266de06ecbc490d16" args="() const " -->
<a class="el" href="a00155.html#2e2726fccf6d975dc1071608cc0bbf90">allocator_type</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00155.html#415eb87e53b1c6a266de06ecbc490d16">get_allocator</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">return allocator object <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="90b31e2954c6e4596c7900435a5f4bc1"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::clear" ref="90b31e2954c6e4596c7900435a5f4bc1" args="()" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00155.html#90b31e2954c6e4596c7900435a5f4bc1">clear</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">clear the queue. not thread-safe. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5a2637188e104503ac2c0dff633014e8"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::unsafe_begin" ref="5a2637188e104503ac2c0dff633014e8" args="()" -->
iterator&nbsp;</td><td class="memItemRight" valign="bottom"><b>unsafe_begin</b> ()</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c7267334ef11087c76c810abb9d5cbc2"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::unsafe_end" ref="c7267334ef11087c76c810abb9d5cbc2" args="()" -->
iterator&nbsp;</td><td class="memItemRight" valign="bottom"><b>unsafe_end</b> ()</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8be757841d0bbf7744508aaf6a141d08"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::unsafe_begin" ref="8be757841d0bbf7744508aaf6a141d08" args="() const " -->
const_iterator&nbsp;</td><td class="memItemRight" valign="bottom"><b>unsafe_begin</b> () const </td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3aac91d288bf227d9d06717b44ef28f7"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::unsafe_end" ref="3aac91d288bf227d9d06717b44ef28f7" args="() const " -->
const_iterator&nbsp;</td><td class="memItemRight" valign="bottom"><b>unsafe_end</b> () const </td></tr>
<tr><td colspan="2"><br><h2>Friends</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="05bffad9626d51abbd4bb82ae2a1cceb"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::internal::concurrent_queue_iterator" ref="05bffad9626d51abbd4bb82ae2a1cceb" args="" -->
class&nbsp;</td><td class="memItemRight" valign="bottom"><b>internal::concurrent_queue_iterator</b></td></tr>
<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><b>destroyer</b></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Class used to ensure exception-safety of method "pop". <br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<h3>template&lt;typename T, class A = cache_aligned_allocator&lt;T&gt;&gt;<br>
class tbb::concurrent_bounded_queue&lt; T, A &gt;</h3>
A high-performance thread-safe blocking concurrent bounded queue.
<p>
This is the pre-PPL TBB concurrent queue which supports 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.
<p>
<hr><h2>Member Typedef Documentation</h2>
<a class="anchor" name="a80e4c11dbb324e4b92a24a77bbcde68"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::size_type" ref="a80e4c11dbb324e4b92a24a77bbcde68" args="" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T, class A = cache_aligned_allocator&lt;T&gt;&gt; </div>
<table class="memname">
<tr>
<td class="memname">typedef std::ptrdiff_t <a class="el" href="a00155.html">tbb::concurrent_bounded_queue</a>&lt; T, A &gt;::<a class="el" href="a00155.html#a80e4c11dbb324e4b92a24a77bbcde68">size_type</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Integral type for representing size of the queue.
<p>
Notice that the size_type is a signed integral type. This is because the size can be negative if there are pending pops without corresponding pushes.
</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="41f4c6bd7a82ab070e840bbf81b0b123"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::pop" ref="41f4c6bd7a82ab070e840bbf81b0b123" args="(T &amp;destination)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T, class A = cache_aligned_allocator&lt;T&gt;&gt; </div>
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="a00155.html">tbb::concurrent_bounded_queue</a>&lt; T, A &gt;::pop </td>
<td>(</td>
<td class="paramtype">T &amp;&nbsp;</td>
<td class="paramname"> <em>destination</em> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Dequeue item from head of queue.
<p>
Block until an item becomes available, and then dequeue it.
</div>
</div><p>
<a class="anchor" name="f3c6c934f85fd02aedbc83a16943193b"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::set_capacity" ref="f3c6c934f85fd02aedbc83a16943193b" args="(size_type new_capacity)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T, class A = cache_aligned_allocator&lt;T&gt;&gt; </div>
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="a00155.html">tbb::concurrent_bounded_queue</a>&lt; T, A &gt;::set_capacity </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00155.html#a80e4c11dbb324e4b92a24a77bbcde68">size_type</a>&nbsp;</td>
<td class="paramname"> <em>new_capacity</em> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Set the capacity.
<p>
Setting the capacity to 0 causes subsequent try_push operations to always fail, and subsequent push operations to block forever.
</div>
</div><p>
<a class="anchor" name="7dc14d1a579a4cccda9f857585e1768d"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::size" ref="7dc14d1a579a4cccda9f857585e1768d" args="() const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T, class A = cache_aligned_allocator&lt;T&gt;&gt; </div>
<table class="memname">
<tr>
<td class="memname"><a class="el" href="a00155.html#a80e4c11dbb324e4b92a24a77bbcde68">size_type</a> <a class="el" href="a00155.html">tbb::concurrent_bounded_queue</a>&lt; T, A &gt;::size </td>
<td>(</td>
<td class="paramname"> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Return number of pushes minus number of pops.
<p>
Note that the result can be negative if there are pops waiting for the corresponding pushes. The result can also exceed <a class="el" href="a00155.html#b2888b3e4e837d7e03f2c731963a402b">capacity()</a> if there are push operations in flight.
</div>
</div><p>
<a class="anchor" name="0ca487019bbb00a196442aff78a1e4f7"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::try_pop" ref="0ca487019bbb00a196442aff78a1e4f7" args="(T &amp;destination)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T, class A = cache_aligned_allocator&lt;T&gt;&gt; </div>
<table class="memname">
<tr>
<td class="memname">bool <a class="el" href="a00155.html">tbb::concurrent_bounded_queue</a>&lt; T, A &gt;::try_pop </td>
<td>(</td>
<td class="paramtype">T &amp;&nbsp;</td>
<td class="paramname"> <em>destination</em> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Attempt to dequeue an item from head of queue.
<p>
Does not wait for item to become available. Returns true if successful; false otherwise.
</div>
</div><p>
<a class="anchor" name="2bd6232531279fb3ccbd296bea23066b"></a><!-- doxytag: member="tbb::concurrent_bounded_queue::try_push" ref="2bd6232531279fb3ccbd296bea23066b" args="(const T &amp;source)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T, class A = cache_aligned_allocator&lt;T&gt;&gt; </div>
<table class="memname">
<tr>
<td class="memname">bool <a class="el" href="a00155.html">tbb::concurrent_bounded_queue</a>&lt; T, A &gt;::try_push </td>
<td>(</td>
<td class="paramtype">const T &amp;&nbsp;</td>
<td class="paramname"> <em>source</em> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Enqueue an item at tail of queue if queue is not already full.
<p>
Does not wait for queue to become not full. Returns true if item is pushed; false if queue was already full.
</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="a00335.html">concurrent_queue.h</a></ul>
<hr>
<p></p>
Copyright &copy; 2005-2010 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.