title: How ought I limit Thread creation using Concurrent-Ruby?
body: <p>I have a process which uses the <a href="https://github.com/ruby-concurrency/concurrent-ruby" rel="nofollow">concurrent-ruby</a> gem to handle a large number of API calls concurrently using <code>Concurrent::Future.execute</code>, and, after some time, it dies:</p>
  
  <pre><code>ERROR -- : can't create Thread (11) (ThreadError)
  /current/vendor/bundler_gems/ruby/2.0.0/bundler/gems/concurrent-ruby-cba3702c4e1e/lib/concurrent/executor/ruby_thread_pool_executor.rb:280:in `initialize'
  </code></pre>
  
  <p>Is there a simple way I can tell <code>Concurrent</code> to limit the number of threads it spawns, given I have no way of knowing in advance just how many API calls it's going to need to make?</p>
  
  <p>Or is this something I need to code for explicitly in my app?</p>
  
  <p>I am using <code>Ruby 2.0.0</code> (alas don't currently have the option to change that)</p>