Skip to lesson

Order processing with producers and consumers

An online store's warehouse is a producer-consumer pipeline: order channels put orders into a queue, and packing staff take them out and bill them. A bounded BlockingQueue makes each side wait for the other, and poison pills stop the workers only after the last real order.

Sign in to continue this lesson

Create an account to read every lesson, practise with the exercises and keep track of your progress.