Skip to content

Commit 98aa28d

Browse files
committed
Improve Poison Pill Javadoc
1 parent 4d1aae2 commit 98aa28d

File tree

1 file changed

+5
-5
lines changed
  • poison-pill/src/main/java/com/iluwatar/poison/pill

1 file changed

+5
-5
lines changed

poison-pill/src/main/java/com/iluwatar/poison/pill/App.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
/**
44
* One of the possible approaches to terminate Producer-Consumer pattern is using the Poison Pill idiom.
5-
* If you use Poison Pill as the termination signal then Producer is responsible to notify Consumer that exchange is over
6-
* and reject any further messages. Consumer receiving Poison Pill will stop reading messages from the queue.
7-
* You must also ensure that the Poison Pill will be the last message that will be read from the queue (if you have
8-
* prioritized queue then this can be tricky).
5+
* If you use Poison Pill as the termination signal then Producer is responsible to notify Consumer that
6+
* the exchange is over and reject any further messages. The Consumer receiving Poison Pill will stop
7+
* reading messages from the queue. You must also ensure that the Poison Pill will be the last message
8+
* that will be read from the queue (if you have prioritized queue then this can be tricky).
99
* <p>
10-
* In simple cases as Poison Pill can be used just null-reference, but holding unique separate shared
10+
* In simple cases the Poison Pill can be just a null-reference, but holding a unique separate shared
1111
* object-marker (with name "Poison" or "Poison Pill") is more clear and self describing.
1212
*
1313
*/

0 commit comments

Comments
 (0)