I wanted to simply write 'Title' but apparently I need at least 30 characters.
Edit: Not a duplicate, I have exactly one producer and exactly one consumer. There will be no double pop or double push conflicts and there will be no accidentally popping an empty queue.
Edit: Since people are incapable of answering the question as it stands, here is pseudocode of the situation I am obviously referring to:
Thread 1:
while (1)
{
if (!q.empty())
q.pop();
}
Thread 2:
while (1)
{
if (the_planets_are_aligned)
q.push(something);
}