locked queue with separate condition variable for empty and full