title: Futures for blocking calls in Scala
body: <p>The <code>Akka</code> documentation says:</p>
  
  <blockquote>
  you may be tempted to just wrap the blocking call inside a Future and work with that instead, but this strategy is too simple: you are quite likely to find bottlenecks or run out of memory or threads when the application runs under increased load.
  </blockquote> 
  
  <p>They suggest the following strategies:</p>
  
  <ul>
  <li><p>Do the blocking call within a <code>Future</code>, ensuring an upper bound on the number of such calls at any point in time (submitting an unbounded number of tasks of this nature will exhaust your memory or thread limits).</p></li>
  <li><p>Do the blocking call within a <code>Future</code>, providing a thread pool with an upper limit on the number of threads which is appropriate for the hardware on which the application runs.</p></li>
  </ul>
  
  <p>Do you know about any implementation of those strategies? </p>