
2013/2/15 Akira Takahashi
Hi, I confused with boost::lockfree::queue behavior.
Fist, run-time capacity:
#include <iostream> #include
int main() { boost::lockfree::queue
que(3); std::cout << std::boolalpha;
std::cout << que.push(1) << std::endl; // true std::cout << que.push(2) << std::endl; // true std::cout << que.push(3) << std::endl; // true std::cout << que.push(4) << std::endl; // false }
I think this behavior is correct.
But, compile-time capacity:
#include <iostream> #include
int main() { boost::lockfree::queue
> que; std::cout << std::boolalpha;
std::cout << que.push(1) << std::endl; // true std::cout << que.push(2) << std::endl; // true std::cout << que.push(3) << std::endl; // false : why? std::cout << que.push(4) << std::endl; // false }
Is this bug or specification?
Thanks, Akira
Added ticket. https://svn.boost.org/trac/boost/ticket/8135