title: Throttle asynchronous Mono by number of concurrent tasks (not time-based)
body: <p>Say I have a method which takes a parameter and returns a <code>Mono&lt;Integer&gt;</code> that asynchronously completes. For example:</p>
  
  <pre><code>Random random = new Random();
  ScheduledExecutorService scheduledExecutorService = Executors.newScheduledThreadPool(16);
  
  Mono&lt;Integer&gt; fetch(String a) {
    return Mono.create(em -&gt; {
      scheduledExecutorService.schedule(() -&gt; em.next(a + " result"), 
        10 + random.nextInt(50), TimeUnit.MILLISECONDS);
    });
  }
  </code></pre>
  
  <p>Say I have a <code>Flux&lt;String&gt;</code> that I can feed into the <code>fetch</code> method above and that can have a lot of elements.</p>
  
  <p>Is there a way I can ensure that the method gets called in parallel, but limit the number of concurrent calls to a predefined number?</p>
  
  <p>E.g. 4 in the above example, while I have 16 available threads - so I always keep 12 spare from this perspective.</p>