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.
 
 
 
 

365 lines
27 KiB

<!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::concurrent_bounded_queue&lt; T, A &gt; Class Template 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&#160;Page</span></a></li>
<li><a href="pages.html"><span>Related&#160;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&#160;List</span></a></li>
<li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&#160;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="a00034.html">concurrent_bounded_queue</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="a00256.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">tbb::concurrent_bounded_queue&lt; T, A &gt; Class Template Reference<div class="ingroups"><a class="el" href="a00235.html">Containers</a></div></div> </div>
</div><!--header-->
<div class="contents">
<p>A high-performance thread-safe blocking concurrent bounded queue.
<a href="a00034.html#details">More...</a></p>
<p><code>#include &lt;concurrent_queue.h&gt;</code></p>
<div class="dynheader">
Inheritance diagram for tbb::concurrent_bounded_queue&lt; T, A &gt;:</div>
<div class="dyncontent">
<div class="center">
<img src="a00034.png" usemap="#tbb::concurrent_bounded_queue&lt; T, A &gt;_map" alt=""/>
<map id="tbb::concurrent_bounded_queue&lt; T, A &gt;_map" name="tbb::concurrent_bounded_queue&lt; T, A &gt;_map">
<area href="a00039.html" title="A high-performance thread-safe blocking concurrent bounded queue. " alt="tbb::deprecated::concurrent_queue&lt; T, A &gt;" shape="rect" coords="0,112,257,136"/>
</map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a6eb564625fef03dd9a5881d5d4e52f9f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6eb564625fef03dd9a5881d5d4e52f9f"></a>
typedef T&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00034.html#a6eb564625fef03dd9a5881d5d4e52f9f">value_type</a></td></tr>
<tr class="memdesc:a6eb564625fef03dd9a5881d5d4e52f9f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Element type in the queue. <br/></td></tr>
<tr class="separator:a6eb564625fef03dd9a5881d5d4e52f9f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acbfceb845de1c770e2b56409f09b0364"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acbfceb845de1c770e2b56409f09b0364"></a>
typedef A&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00034.html#acbfceb845de1c770e2b56409f09b0364">allocator_type</a></td></tr>
<tr class="memdesc:acbfceb845de1c770e2b56409f09b0364"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocator type. <br/></td></tr>
<tr class="separator:acbfceb845de1c770e2b56409f09b0364"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5fa4002bcd265d9d3ed305e3b686f1da"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5fa4002bcd265d9d3ed305e3b686f1da"></a>
typedef T &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00034.html#a5fa4002bcd265d9d3ed305e3b686f1da">reference</a></td></tr>
<tr class="memdesc:a5fa4002bcd265d9d3ed305e3b686f1da"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reference type. <br/></td></tr>
<tr class="separator:a5fa4002bcd265d9d3ed305e3b686f1da"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af838e520ce0db2c22369748c019b11cb"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af838e520ce0db2c22369748c019b11cb"></a>
typedef const T &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00034.html#af838e520ce0db2c22369748c019b11cb">const_reference</a></td></tr>
<tr class="memdesc:af838e520ce0db2c22369748c019b11cb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Const reference type. <br/></td></tr>
<tr class="separator:af838e520ce0db2c22369748c019b11cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae73fa352d781bdb9d01bfb77f2a8bc28"><td class="memItemLeft" align="right" valign="top">typedef std::ptrdiff_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00034.html#ae73fa352d781bdb9d01bfb77f2a8bc28">size_type</a></td></tr>
<tr class="memdesc:ae73fa352d781bdb9d01bfb77f2a8bc28"><td class="mdescLeft">&#160;</td><td class="mdescRight">Integral type for representing size of the queue. <a href="#ae73fa352d781bdb9d01bfb77f2a8bc28">More...</a><br/></td></tr>
<tr class="separator:ae73fa352d781bdb9d01bfb77f2a8bc28"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a72725361e050c5a981035a20ef1b773e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a72725361e050c5a981035a20ef1b773e"></a>
typedef std::ptrdiff_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00034.html#a72725361e050c5a981035a20ef1b773e">difference_type</a></td></tr>
<tr class="memdesc:a72725361e050c5a981035a20ef1b773e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Difference type for iterator. <br/></td></tr>
<tr class="separator:a72725361e050c5a981035a20ef1b773e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a42dfb71b1e4bdc0da3c1217d0d40ddd5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a42dfb71b1e4bdc0da3c1217d0d40ddd5"></a>
typedef <br class="typebreak"/>
internal::concurrent_queue_iterator<br class="typebreak"/>
&lt; <a class="el" href="a00034.html">concurrent_bounded_queue</a>, T &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>iterator</b></td></tr>
<tr class="separator:a42dfb71b1e4bdc0da3c1217d0d40ddd5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a18049841284051e18b854692bd04602c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a18049841284051e18b854692bd04602c"></a>
typedef <br class="typebreak"/>
internal::concurrent_queue_iterator<br class="typebreak"/>
&lt; <a class="el" href="a00034.html">concurrent_bounded_queue</a>, <br class="typebreak"/>
const T &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>const_iterator</b></td></tr>
<tr class="separator:a18049841284051e18b854692bd04602c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><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:a85f8a800cae02b601f36ad7a655a0126"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a85f8a800cae02b601f36ad7a655a0126"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00034.html#a85f8a800cae02b601f36ad7a655a0126">concurrent_bounded_queue</a> (const <a class="el" href="a00034.html#acbfceb845de1c770e2b56409f09b0364">allocator_type</a> &amp;a=<a class="el" href="a00034.html#acbfceb845de1c770e2b56409f09b0364">allocator_type</a>())</td></tr>
<tr class="memdesc:a85f8a800cae02b601f36ad7a655a0126"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct empty queue. <br/></td></tr>
<tr class="separator:a85f8a800cae02b601f36ad7a655a0126"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aad6fd2353d64c2c31d074cd99df58c02"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aad6fd2353d64c2c31d074cd99df58c02"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00034.html#aad6fd2353d64c2c31d074cd99df58c02">concurrent_bounded_queue</a> (const <a class="el" href="a00034.html">concurrent_bounded_queue</a> &amp;src, const <a class="el" href="a00034.html#acbfceb845de1c770e2b56409f09b0364">allocator_type</a> &amp;a=<a class="el" href="a00034.html#acbfceb845de1c770e2b56409f09b0364">allocator_type</a>())</td></tr>
<tr class="memdesc:aad6fd2353d64c2c31d074cd99df58c02"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy constructor. <br/></td></tr>
<tr class="separator:aad6fd2353d64c2c31d074cd99df58c02"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afcfdc998e106fdb7b2dfa5df880cd9cf"><td class="memTemplParams" colspan="2"><a class="anchor" id="afcfdc998e106fdb7b2dfa5df880cd9cf"></a>
template&lt;typename InputIterator &gt; </td></tr>
<tr class="memitem:afcfdc998e106fdb7b2dfa5df880cd9cf"><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00034.html#afcfdc998e106fdb7b2dfa5df880cd9cf">concurrent_bounded_queue</a> (InputIterator begin, InputIterator end, const <a class="el" href="a00034.html#acbfceb845de1c770e2b56409f09b0364">allocator_type</a> &amp;a=<a class="el" href="a00034.html#acbfceb845de1c770e2b56409f09b0364">allocator_type</a>())</td></tr>
<tr class="memdesc:afcfdc998e106fdb7b2dfa5df880cd9cf"><td class="mdescLeft">&#160;</td><td class="mdescRight">[begin,end) constructor <br/></td></tr>
<tr class="separator:afcfdc998e106fdb7b2dfa5df880cd9cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab1291bf6837ecfb8836c24dde5dd80b5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab1291bf6837ecfb8836c24dde5dd80b5"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00034.html#ab1291bf6837ecfb8836c24dde5dd80b5">~concurrent_bounded_queue</a> ()</td></tr>
<tr class="memdesc:ab1291bf6837ecfb8836c24dde5dd80b5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroy queue. <br/></td></tr>
<tr class="separator:ab1291bf6837ecfb8836c24dde5dd80b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae5e9051772bbc93b2ccb8fd0a98a21f5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae5e9051772bbc93b2ccb8fd0a98a21f5"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00034.html#ae5e9051772bbc93b2ccb8fd0a98a21f5">push</a> (const T &amp;source)</td></tr>
<tr class="memdesc:ae5e9051772bbc93b2ccb8fd0a98a21f5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enqueue an item at tail of queue. <br/></td></tr>
<tr class="separator:ae5e9051772bbc93b2ccb8fd0a98a21f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a87926c31967a918ce80690a9ed5d6fa8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00034.html#a87926c31967a918ce80690a9ed5d6fa8">pop</a> (T &amp;destination)</td></tr>
<tr class="memdesc:a87926c31967a918ce80690a9ed5d6fa8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Dequeue item from head of queue. <a href="#a87926c31967a918ce80690a9ed5d6fa8">More...</a><br/></td></tr>
<tr class="separator:a87926c31967a918ce80690a9ed5d6fa8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a77a755d94cabf5208905d10d5b57419c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a77a755d94cabf5208905d10d5b57419c"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00034.html#a77a755d94cabf5208905d10d5b57419c">abort</a> ()</td></tr>
<tr class="memdesc:a77a755d94cabf5208905d10d5b57419c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Abort all pending queue operations. <br/></td></tr>
<tr class="separator:a77a755d94cabf5208905d10d5b57419c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a03d93a240841a21788396bebd71c51bd"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00034.html#a03d93a240841a21788396bebd71c51bd">try_push</a> (const T &amp;source)</td></tr>
<tr class="memdesc:a03d93a240841a21788396bebd71c51bd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enqueue an item at tail of queue if queue is not already full. <a href="#a03d93a240841a21788396bebd71c51bd">More...</a><br/></td></tr>
<tr class="separator:a03d93a240841a21788396bebd71c51bd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3086cb4dcdeee245ef5cf34f72fb3e10"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00034.html#a3086cb4dcdeee245ef5cf34f72fb3e10">try_pop</a> (T &amp;destination)</td></tr>
<tr class="memdesc:a3086cb4dcdeee245ef5cf34f72fb3e10"><td class="mdescLeft">&#160;</td><td class="mdescRight">Attempt to dequeue an item from head of queue. <a href="#a3086cb4dcdeee245ef5cf34f72fb3e10">More...</a><br/></td></tr>
<tr class="separator:a3086cb4dcdeee245ef5cf34f72fb3e10"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9d6c20fd8c193c12b6a7b0c3101fd966"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00034.html#ae73fa352d781bdb9d01bfb77f2a8bc28">size_type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00034.html#a9d6c20fd8c193c12b6a7b0c3101fd966">size</a> () const </td></tr>
<tr class="memdesc:a9d6c20fd8c193c12b6a7b0c3101fd966"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return number of pushes minus number of pops. <a href="#a9d6c20fd8c193c12b6a7b0c3101fd966">More...</a><br/></td></tr>
<tr class="separator:a9d6c20fd8c193c12b6a7b0c3101fd966"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8c59578f28c5fb4718b0eff43776e879"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8c59578f28c5fb4718b0eff43776e879"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00034.html#a8c59578f28c5fb4718b0eff43776e879">empty</a> () const </td></tr>
<tr class="memdesc:a8c59578f28c5fb4718b0eff43776e879"><td class="mdescLeft">&#160;</td><td class="mdescRight">Equivalent to <a class="el" href="a00034.html#a9d6c20fd8c193c12b6a7b0c3101fd966" title="Return number of pushes minus number of pops. ">size()</a>&lt;=0. <br/></td></tr>
<tr class="separator:a8c59578f28c5fb4718b0eff43776e879"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a526487063242569685af8c8d778d39e0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a526487063242569685af8c8d778d39e0"></a>
<a class="el" href="a00034.html#ae73fa352d781bdb9d01bfb77f2a8bc28">size_type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00034.html#a526487063242569685af8c8d778d39e0">capacity</a> () const </td></tr>
<tr class="memdesc:a526487063242569685af8c8d778d39e0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Maximum number of allowed elements. <br/></td></tr>
<tr class="separator:a526487063242569685af8c8d778d39e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a768699675813575eec08c1f43afda395"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00034.html#a768699675813575eec08c1f43afda395">set_capacity</a> (<a class="el" href="a00034.html#ae73fa352d781bdb9d01bfb77f2a8bc28">size_type</a> new_capacity)</td></tr>
<tr class="memdesc:a768699675813575eec08c1f43afda395"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the capacity. <a href="#a768699675813575eec08c1f43afda395">More...</a><br/></td></tr>
<tr class="separator:a768699675813575eec08c1f43afda395"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaeba11bbcd368a7a3a6e6e2dd3082c9c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aaeba11bbcd368a7a3a6e6e2dd3082c9c"></a>
<a class="el" href="a00034.html#acbfceb845de1c770e2b56409f09b0364">allocator_type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00034.html#aaeba11bbcd368a7a3a6e6e2dd3082c9c">get_allocator</a> () const </td></tr>
<tr class="memdesc:aaeba11bbcd368a7a3a6e6e2dd3082c9c"><td class="mdescLeft">&#160;</td><td class="mdescRight">return allocator object <br/></td></tr>
<tr class="separator:aaeba11bbcd368a7a3a6e6e2dd3082c9c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a246be3920e079ea4847933f106baa98f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a246be3920e079ea4847933f106baa98f"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00034.html#a246be3920e079ea4847933f106baa98f">clear</a> ()</td></tr>
<tr class="memdesc:a246be3920e079ea4847933f106baa98f"><td class="mdescLeft">&#160;</td><td class="mdescRight">clear the queue. not thread-safe. <br/></td></tr>
<tr class="separator:a246be3920e079ea4847933f106baa98f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac0c931eaa1ddc30025e49d06cc383703"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac0c931eaa1ddc30025e49d06cc383703"></a>
iterator&#160;</td><td class="memItemRight" valign="bottom"><b>unsafe_begin</b> ()</td></tr>
<tr class="separator:ac0c931eaa1ddc30025e49d06cc383703"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a634cece9742cbaba56ba6f7777568e4c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a634cece9742cbaba56ba6f7777568e4c"></a>
iterator&#160;</td><td class="memItemRight" valign="bottom"><b>unsafe_end</b> ()</td></tr>
<tr class="separator:a634cece9742cbaba56ba6f7777568e4c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2ed2f8130fd679e89327cb292fb25510"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2ed2f8130fd679e89327cb292fb25510"></a>
const_iterator&#160;</td><td class="memItemRight" valign="bottom"><b>unsafe_begin</b> () const </td></tr>
<tr class="separator:a2ed2f8130fd679e89327cb292fb25510"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a873d62f59fd79959c0204f5fb44c774d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a873d62f59fd79959c0204f5fb44c774d"></a>
const_iterator&#160;</td><td class="memItemRight" valign="bottom"><b>unsafe_end</b> () const </td></tr>
<tr class="separator:a873d62f59fd79959c0204f5fb44c774d"><td class="memSeparator" colspan="2">&#160;</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:a1f5eec0de2e660ea5372d19393f0920b"><td class="memTemplParams" colspan="2"><a class="anchor" id="a1f5eec0de2e660ea5372d19393f0920b"></a>
template&lt;typename Container , typename Value &gt; </td></tr>
<tr class="memitem:a1f5eec0de2e660ea5372d19393f0920b"><td class="memTemplItemLeft" align="right" valign="top">class&#160;</td><td class="memTemplItemRight" valign="bottom"><b>internal::concurrent_queue_iterator</b></td></tr>
<tr class="separator:a1f5eec0de2e660ea5372d19393f0920b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><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>
<p>A high-performance thread-safe blocking concurrent bounded queue. </p>
<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>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a class="anchor" id="ae73fa352d781bdb9d01bfb77f2a8bc28"></a>
<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="a00034.html">tbb::concurrent_bounded_queue</a>&lt; T, A &gt;::<a class="el" href="a00034.html#ae73fa352d781bdb9d01bfb77f2a8bc28">size_type</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Integral type for representing size of the queue. </p>
<p>Note 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. </p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a87926c31967a918ce80690a9ed5d6fa8"></a>
<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="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="a00034.html">tbb::concurrent_bounded_queue</a>&lt; T, A &gt;::pop </td>
<td>(</td>
<td class="paramtype">T &amp;&#160;</td>
<td class="paramname"><em>destination</em>)</td><td></td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Dequeue item from head of queue. </p>
<p>Block until an item becomes available, and then dequeue it. </p>
</div>
</div>
<a class="anchor" id="a768699675813575eec08c1f43afda395"></a>
<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="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="a00034.html">tbb::concurrent_bounded_queue</a>&lt; T, A &gt;::set_capacity </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00034.html#ae73fa352d781bdb9d01bfb77f2a8bc28">size_type</a>&#160;</td>
<td class="paramname"><em>new_capacity</em>)</td><td></td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the capacity. </p>
<p>Setting the capacity to 0 causes subsequent try_push operations to always fail, and subsequent push operations to block forever. </p>
</div>
</div>
<a class="anchor" id="a9d6c20fd8c193c12b6a7b0c3101fd966"></a>
<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="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="a00034.html#ae73fa352d781bdb9d01bfb77f2a8bc28">size_type</a> <a class="el" href="a00034.html">tbb::concurrent_bounded_queue</a>&lt; T, A &gt;::size </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">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Return number of pushes minus number of pops. </p>
<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="a00034.html#a526487063242569685af8c8d778d39e0" title="Maximum number of allowed elements. ">capacity()</a> if there are push operations in flight. </p>
</div>
</div>
<a class="anchor" id="a3086cb4dcdeee245ef5cf34f72fb3e10"></a>
<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="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool <a class="el" href="a00034.html">tbb::concurrent_bounded_queue</a>&lt; T, A &gt;::try_pop </td>
<td>(</td>
<td class="paramtype">T &amp;&#160;</td>
<td class="paramname"><em>destination</em>)</td><td></td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Attempt to dequeue an item from head of queue. </p>
<p>Does not wait for item to become available. Returns true if successful; false otherwise. </p>
<p>Referenced by <a class="el" href="a00039.html#a8d6825341ca673ea316202474a021174">tbb::deprecated::concurrent_queue&lt; T, A &gt;::pop_if_present()</a>.</p>
</div>
</div>
<a class="anchor" id="a03d93a240841a21788396bebd71c51bd"></a>
<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="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool <a class="el" href="a00034.html">tbb::concurrent_bounded_queue</a>&lt; T, A &gt;::try_push </td>
<td>(</td>
<td class="paramtype">const T &amp;&#160;</td>
<td class="paramname"><em>source</em>)</td><td></td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Enqueue an item at tail of queue if queue is not already full. </p>
<p>Does not wait for queue to become not full. Returns true if item is pushed; false if queue was already full. </p>
<p>Referenced by <a class="el" href="a00039.html#a129cde9f5f101ddd623619c838be07f3">tbb::deprecated::concurrent_queue&lt; T, A &gt;::push_if_not_full()</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>concurrent_queue.h</li>
</ul>
</div><!-- contents -->
<hr>
<p></p>
Copyright &copy; 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.