title: Managing threads efficiently in C#
body: <p>I have an application in which the user will choose to do a number of tasks along with the maximum number of threads. Each task should run on a separate thread. Here is what I am looking for:</p>
  
  <p>If the user specified "n less than t" where n is the maximum number of threads and t is the number of tasks. The program should run "n" threads and after they finish, the program should be notified by some way and repeat the loop untill all tasks are done.</p>
  
  <p>My Question is:
  How to know that all running threads has finished their job so that I can repeat the loop.</p>