In reply to dave_59:
Yes, I am agreed with Dave. A mailbox is a better option for a synchronization than queue.
But, still if you want to use a common queue in two different clock cycles, then you can use size() method of queue to provide synchronization at popping clock.
e.g.,
if(queue.size() > 0) queue.pop_back();