A producer adds items to a buffer and a consumer removes them. The buffer absorbs short differences between their rates.
An unbounded buffer can grow without limit when consumption falls behind. A full buffer should pause producers or signal them to slow down.
When to use
Use it in async pipelines, message queues, and file processing.