classical producer-consumer example