When moving elements from the tail of the queue to the head, if there is more than one element on the tail, then leave the topmost (last pushed) element on the tail and don't update the tail pointer. This reduces contention between producers and the consumer.
When moving elements from the tail of the queue to the head, if there is more than one element on the tail, then leave the topmost (last pushed) element on the tail and don't update the tail pointer. This reduces contention between producers and the consumer.