The Producer-Consumer Pattern in Java Made Easy

1 · César Soto Valero · June 28, 2020, 7 a.m.
An example using the BlockingQueue Java interface - I see the usage of a recurring handy pattern for doing data collection and analysis in software engineering: the producer-consumer pattern. This pattern simplifies the data acquisition (handled by the Producer), and the data post-processing (handled by the Consumer). The Producer collects the data items one at the time and......