The current implementation of concurrent_queue relies on a native synchronization mechanism, i.e. lock the entire queue structure whenever it pushes or pops. This leads to limited scalability. There are much more efficient implementation for MPMC Queues (e.g. Dmitry's lock free implementation that relies purely on atomics).
Plan:
References:
The current implementation of
concurrent_queuerelies on a native synchronization mechanism, i.e. lock the entire queue structure whenever it pushes or pops. This leads to limited scalability. There are much more efficient implementation for MPMC Queues (e.g. Dmitry's lock free implementation that relies purely on atomics).Plan:
concurrent_queuetosynchronized_queue, which reflects the implementation more accurately.bounded_mpmc_queue(MPMC means Multi-Producer-Multi-Consumer).References: