RxJava: How to Subscribe only if the Observable is Cold?
<p>TL;DR: How do you create an Observable that only creates a Subscription if it is <em>cold</em> and queues any other subscribe calls when it is <em>hot</em>?</p>

<p>I would like to create <strong>an Observable which can only execute a single Subscription at a time</strong>. If any other Subscribers subscribe to the Observable, I would like them to be queued to run when the Observable is completed (after onComplete).</p>

<p>I can build this construct myself by having some kind of stack and popping the stack on every onComplete - but it feels like this functionality already exists in RxJava.</p>

<p>Is there a way to limit subscriptions in this way?</p>

<p><a href="http://reactivex.io/documentation/observable.html" rel="nofollow">(More on hot and cold observables)</a></p>