title: How do I block on ToObservable with a List<>?
body: <p>I am trying on RX for the first time and I have a couple questions.</p>
  
  <p>1) Is there a better way to accomplish the Async of my collection?</p>
  
  <p>2) I need to block on the thread until all Async Tasks are complete, how do I do that?</p>
  
  <pre><code>class Program
  {
  
      internal class MyClass
      {
          private readonly List&lt;int&gt; _myData = new List&lt;int&gt;() { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
  
          private readonly Random random = new Random();
  
          public int DoSomething(int j)
          {
              int i = random.Next(j * 1000) - (j * 200);
              i = i &lt; 0 ? 1000 : i;
              Thread.Sleep(i);
              Console.WriteLine(j);
              return j;
          }
  
          public IObservable&lt;int&gt; DoSomethingAsync(int j)
          {
              return Observable.CreateWithDisposable&lt;int&gt;(
                  o =&gt; Observable.ToAsync&lt;int, int&gt;(DoSomething)(j).Subscribe(o)
                  );
          }
  
          public void CreateTasks()
          {
              _myData.ToObservable(Scheduler.NewThread).Subscribe(
              onNext: (i) =&gt; DoSomethingAsync(i).Subscribe(),
              onCompleted: () =&gt; Console.WriteLine("Completed")
                  );
          }
      }
  
      static void Main(string[] args)
      {
          MyClass test = new MyClass();
  
          test.CreateTasks();
  
          Console.ReadKey(); 
      } 
  }
  </code></pre>
  
  <p>(Note: I know I could have used Observable.Range for my list of Int but my list is not of type Int in the real program).</p>