When Not to Use Queues
- A queue is inherently a bottle neck, because it must maintain first-in first-out order.
- A thread that is popping a value may have to wait idly until the value is pushed.
- A queue is a passive data structure. If a thread pushes a value, it could take time until it pops the value, and in the meantime the value (and whatever it references) becomes “cold” in cache. Or worse yet, another thread pops the value, and the value (and whatever it references) must be moved to the other processor.