title: once a thread is done, notify main thread
body: <p>my winform has a thread running and I need it to notify main thread once it's done, then the main thread can set progressbar back to normal state.</p>
  
  <p>currently, what i have is something as following</p>
  
  <pre><code>------begin---------
  // codes before....
  call thread one....
  create thread two instance then start thread two
  ---------end------------------
  </code></pre>
  
  <p>in thread two, i have </p>
  
  <pre><code>--------begin------
   while(threadOne.isalive){
     Thread.Sleep(500);
   }
   call setProgressbar delegate
   ---------end----------------
  </code></pre>
  
  <p>i did this instead of put an var in thread one is because thread one is recursive method....
  i wonder if this correct way of doing it, can someone help? 
  thanks</p>