Learned producer-consumer