Also, the way a queue prevents two consumers from popping off the same element is the same way a mutex is implemented.