Producer-consumer
A design pattern where producers create data and consumers process it, coordinated via a queue.
A producer fills a buffer with data (often a concurrent queue), and one or more consumers remove and process elements. Producers and consumers run independently in separate threads without knowing about each other. If the queue is full, the producer pauses; if empty, the consumer pauses. It decouples data sources from processing and allows different speeds.
This pattern is everywhere: thread pools where workers are consumers, web servers where network readers produce requests, ETL pipelines with stepwise processing. It has scaled from single-threaded buffers to global distributed message queues like Kafka.