picos
picos copied to clipboard
Try to avoid contention on back of the queue
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.