title: How can I get started creating a multithreaded load balancer?
body: <p>I have an interesting exercise to solve from my professor. But I need a little bit of help so it does not become boring during the holidays.</p>
  
  <p>The exercise is to </p>
  
  <ul>
  <li>create a multithreaded load balancer, that reads 1 measuring point from 5 sensors every second. (therefore 5 values every second).  </li>
  <li>Then do some "complex" calculations with those values.  </li>
  <li>Printing results of the calculations on the screen. (like max value or average value of sensor 1-5 and so on, of course multithreaded) </li>
  <li>As an additional task I also have to ensure that if in the future for example 500 sensors would be read every second the computer doesn't quit the job.(load balancing).</li>
  </ul>
  
  <p>I have a csv textfile with ~400 measuring points from 5 imaginary sensors.</p>
  
  <p>What I think I have to do: </p>
  
  <ol>
  <li>Read the measuring points into an array</li>
  <li>Ensure thread safe access to that array</li>
  <li>Spawn a new thread for every value that calculates some math stuff</li>
  <li>Set a max value for maximum concurrent working threads</li>
  </ol>
  
  <p>I am new to multithreading applications in c# but I think using threadpool is the right way. I am currently working on a queue and maybe starting it inside a task so it wont block the application. </p>
  
  <p>What would you recommend?</p>