producer-consumer exercise