title: use RXJS to unsubscribe when a Subject emits specific value
body: <p>I think I should leverage RXJS for a particular use case. The use case is that I have a subscription that I want to live until a certain value is emitted from a Subject somewhere else.</p>
  <p>Eg:</p>
  <pre><code>// The sub to unsub when a certain &lt;value&gt; is emitted from a Subject elsewhere.
  this.someObservable.subscribe(() =&gt; ...)
  
  
  // Somewhere in the code far, far away, this should kill the subscription(s) that cares about &lt;value&gt;
  this.kill.next(&lt;value&gt;)
  </code></pre>
  <p>My go to approach to handle this is caching the subscriptions and then unsubscribing when <code>this.kill.next(&lt;value&gt;)</code> with the relevant <code>&lt;value&gt;</code> is called. Though, that is the imperative approach and feels like it can be done better via <code>takeWhile</code> or some other such technique. Perhaps I might need to merge <code>someObservable</code> with <code>kill</code> Subject ?</p>
  <p>How can I leverage RXJS to handle this?</p>