File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
poison-pill/src/main/java/com/iluwatar/poison/pill Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 2
2
3
3
/**
4
4
* 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).
9
9
* <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
11
11
* object-marker (with name "Poison" or "Poison Pill") is more clear and self describing.
12
12
*
13
13
*/
You can’t perform that action at this time.
0 commit comments