title: Limit throughput with RxJava
body: <p>The case I'm into right now is quite hard to explain so I will write a simpler version just to explain the issue.</p>
  
  <p>I have an <code>Observable.from()</code> which emits a sequence of files defined by an <code>ArrayList</code> of files. All of these files should be uploaded to a server. For that I have an function that does the job and returns an <code>Observable</code>. </p>
  
  <pre><code>Observable&lt;Response&gt; uploadFile(File file);
  </code></pre>
  
  <p>When I run this code it gets crazy, the <code>Observable.from()</code> emits all of the files and they are uploaded all at ones, or at least for a max of threads it can handle.</p>
  
  <p>I want to have a max of 2 file uploads in parallel. Is there any operator that can handle this for me?</p>
  
  <p>I tried <strong>buffer</strong>, <strong>window</strong> and some others but they seems to only emit two items together instead of having two parallel file uploads constantly. I also tried to set a max threads pool on the uploading part, but this cannot be used in my case.</p>
  
  <p>There should be a simple operator for this right? Am I missing something?</p>