Intel® Threading Building Blocks (Intel® TBB) provides highly concurrent container classes. These containers can be used with raw Windows* OS or Linux* OS threads, or in conjunction with task-based programming.
Queues are widely used in parallel programs to buffer consumers from producers. Before using an explicit queue, however, consider using parallel_do or pipeline instead. These options are often more efficient than queues for the following reasons:
The high-level containers in Intel® Threading Building Blocks enable common idioms for concurrent access. They are suitable for scenarios where the alternative would be a serial container with a lock around it.