Boost C++ Libraries: Ticket #8560: [lockfree] spsc_queue capacity one off https://svn.boost.org/trac10/ticket/8560 <p> This is related to ticket <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/8135" title="#8135: Bugs: [lockfree] compile time capacity difference behavior (closed: fixed)">#8135</a> </p> <p> Should boost::lockfree::spsc_queue also be allocating one extra node to account for it's internal marker? Please consider the following simple example: </p> <pre class="wiki">#include &lt;iostream&gt; #include &lt;boost/lockfree/spsc_queue.hpp&gt; int main() { boost::lockfree::spsc_queue&lt;float&gt; que( 3 ); std::cout &lt;&lt; std::boolalpha; std::cout &lt;&lt; que.push(1) &lt;&lt; std::endl; // true std::cout &lt;&lt; que.push(2) &lt;&lt; std::endl; // true std::cout &lt;&lt; que.push(3) &lt;&lt; std::endl; // false &lt;--- should be true? std::cout &lt;&lt; que.push(4) &lt;&lt; std::endl; // false return 0 } </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/8560 Trac 1.4.3 timblechmann Mon, 20 May 2013 10:02:17 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/8560#comment:1 https://svn.boost.org/trac10/ticket/8560#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> Ticket