title: Wait for an async operation in onNext of RxJS Observable
body: <p>I have an RxJS sequence being consumed in the normal manner...</p>
  
  <p>However, in the observable 'onNext' handler, some of the operations will complete synchronously, but others require async callbacks, that need to be waited on before processing the next item in the input sequence.</p>
  
  <p>...little bit confused how to do this. Any ideas?  thanks!</p>
  
  <pre><code>someObservable.subscribe(
      function onNext(item)
      {
          if (item == 'do-something-async-and-wait-for-completion')
          {
              setTimeout(
                  function()
                  {
                      console.log('okay, we can continue');
                  }
                  , 5000
              );
          }
          else
          {
              // do something synchronously and keep on going immediately
              console.log('ready to go!!!');
          }
      },
      function onError(error)
      {
          console.log('error');
      },
      function onComplete()
      {
          console.log('complete');
      }
  );
  </code></pre>