title: Java about 100 parallel threads, memory management
body: <p>I am writing an optimazation algorithm which creates about 100 threads. Currently, I start them all at one time (for-loop) and after that I tell every thread that it should join().</p>
  
  <p>My problem is now that each thread uses to much memory so the heap space exception won't take long. I want some kind of scheduling but don't know how to implement it.</p>
  
  <p>I have something like this in mind: start 10 threads and every time one of these finishes start a new one. So that there are allways running 10 threads at a time until no thread is left.</p>
  
  <p>Has someone an idea or knows how to realize something like this?</p>
  
  <p>Thank you very much and regards from Cologne</p>
  
  <p>Marco</p>