I just started evaluating TBB for a project at hand and I'm wondering what kind of performance should I expect from tbb::concurrent_bounded_queue. Some questions that I have not found answer to by glancing at the code:
- Is it lock-based / lock-free / wait-free?
- Is the fast-path lock-free / wait-free?
- Is it suitable for single-producer / multi-producer / single-consumer / multi-consumer?
- Is it NUMA-aware?
Sorry if this is somewhere in the documentation, but I haven't been able to find the answers after reading it carefully. Appreciate any help in advance!
Answering your questions: tbb::concurrent_bounded_queue is lock-based. It uses fine-grained locks. As far as I know, even the fast-path is not lock-free. It is suitable for multi-producer/consumer and it is not NUMA-aware.