From 98aa28d94e76157e2c7124db49ac930f1412b220 Mon Sep 17 00:00:00 2001 From: Ilkka Seppala Date: Sat, 3 Oct 2015 23:53:09 +0300 Subject: [PATCH] Improve Poison Pill Javadoc --- .../src/main/java/com/iluwatar/poison/pill/App.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/poison-pill/src/main/java/com/iluwatar/poison/pill/App.java b/poison-pill/src/main/java/com/iluwatar/poison/pill/App.java index 526ca5b86..91d30fddd 100644 --- a/poison-pill/src/main/java/com/iluwatar/poison/pill/App.java +++ b/poison-pill/src/main/java/com/iluwatar/poison/pill/App.java @@ -2,12 +2,12 @@ package com.iluwatar.poison.pill; /** * One of the possible approaches to terminate Producer-Consumer pattern is using the Poison Pill idiom. - * If you use Poison Pill as the termination signal then Producer is responsible to notify Consumer that exchange is over - * and reject any further messages. Consumer receiving Poison Pill will stop reading messages from the queue. - * You must also ensure that the Poison Pill will be the last message that will be read from the queue (if you have - * prioritized queue then this can be tricky). + * If you use Poison Pill as the termination signal then Producer is responsible to notify Consumer that + * the exchange is over and reject any further messages. The Consumer receiving Poison Pill will stop + * reading messages from the queue. You must also ensure that the Poison Pill will be the last message + * that will be read from the queue (if you have prioritized queue then this can be tricky). *

- * In simple cases as Poison Pill can be used just null-reference, but holding unique separate shared + * In simple cases the Poison Pill can be just a null-reference, but holding a unique separate shared * object-marker (with name "Poison" or "Poison Pill") is more clear and self describing. * */