Taskqueue multithreading
Use an Executor
Maintaining a work queue and a thread pool are problems that an executor tackles:

This interface provides a way of decoupling task submission from the mechanics of how each task will be run, including details of thread use, scheduling, etc. An Executor is normally used instead of explicitly creating threads.

The use of Futures also helps you impose time constraints and handle exceptions thrown during execution.
(Note that you'll typically want to use ExecutorService or CompletionService as Executor is a minimalistic interface.)
To paraphrase your example:
class IncrediblyLongRunningTask implements Callable&lt;Long&gt; {
  @Override
  public Long call() throws Exception {
    // ...
  }
}

public void compute() throws InterruptedException {  
  final ExecutorService service = Executors.newFixedThreadPool(50);
  final List&lt;IncrediblyLongRunningTask&gt; tasks = new ArrayList&lt;&gt;();
  for ( int i = 0; i &lt; /*...*/; i++ ) {
    task.add(new IncrediblyLongRunningTask());
  }
  final List&lt;Future&lt;Long&gt;&gt; futures = service.invokeAll(tasks); // returns when all done
  service.shutdown();
  for ( final Future&lt;Long&gt; future : futures ) {
    // ...
  }
}