28 lines
723 B
Markdown
Raw Normal View History

---
layout: pattern
title: Poison Pill
folder: poison-pill
permalink: /patterns/poison-pill/
pumlid: JSZ14SCm20NHLf82BExfXiYCJGOX3NpYzkDZRllsgTwjTgcmnmciV145N-rGdFMkbEZJ8OxMvo2rkXWSzE4lRxka7huj1YGyQN3UGMjgpdkh6Gdwlrl5QAk6_G00
categories: Other
2015-12-28 15:52:44 +02:00
tags:
- Java
- Difficulty-Intermediate
2016-07-21 09:27:48 +03:00
- Reactive
---
## Intent
Poison Pill is known predefined data item that allows to provide
graceful shutdown for separate distributed consumption process.
![alt text](./etc/poison-pill.png "Poison Pill")
## Applicability
Use the Poison Pill idiom when
* need to send signal from one thread/process to another to terminate
## Real world examples
* [akka.actor.PoisonPill](http://doc.akka.io/docs/akka/2.1.4/java/untyped-actors.html)