Merge "Fix race condition between ProducerQueue dequeue and ConsumerQueue dequeue newly allocated buffer."