title: How to implement simple threading with a fixed number of worker threads
body: <p>I'm looking for the simplest, most straightforward way to implement the following:</p>
  
  <ul>
  <li>The main program instantiates worker
  threads to do a task.</li>
  <li>Only <code>n</code> tasks can be running at once.</li>
  <li>When <code>n</code> is reached, no more workers
  are started until the count of
  running threads drops back below <code>n</code>.</li>
  </ul>