Updated producer-consumer implementations