title: How to pause an observable
body: <p>How to really pause an rxjs observable?</p>
  
  <p>I have the following code:</p>
  
  <pre><code>var pauser = new Rx.Subject();
  var animation = new Rx.Subject();
  var source = animation.pausableBuffered(pauser);
  
  source
  .subscribe(function(frame) {
      console.log('subscribe', frame);
      setTimeout(function() {
          source.resume();
      }, frame.duration);
      source.pause();
  });
  
  pauser.onNext(true);
  console.log('start');
  animation.onNext({ duration: 1000 });
  animation.onNext({ duration: 2000 });
  animation.onNext({ duration: 2000 });
  </code></pre>
  
  <p><a href="http://jsfiddle.net/bbvarga/8yvLhjhe/" rel="nofollow">http://jsfiddle.net/bbvarga/8yvLhjhe/</a></p>
  
  <p>I expect a <strong>start</strong> message in the console, right after a <strong>subscribe</strong>, than 1s break, than one <strong>subscribe</strong> message, than 2s break, and the last <strong>subscribe</strong></p>
  
  <p>but after the one second break I got the two last <strong>subscribe</strong> message immediately. Seems like I can pause the observable only once.</p>
  
  <p>For those who are interested in what do I want to achieve: I want to have a queue of events, and I want to receive the next event, if some callback is called for the previous one (the event finished. now it's just a simple setTimeout)</p>