An example of the Producer/Consumer Pattern in Java