A producer thread generates data faster than a consumer can process it. How do you handle it?

Situational