Consider this pseudocode:

Public void DoSomething()
{
  Foreach (pending_job job in ListOfPendingJobs)
  {
        job.ExecuteLongOperation();
  }

  Return to caller;
}

What I want to do is to execute the job.ExecuteLongOperation() on a
separate thread using BackGroundWorker(). The question is what is the
best practice/pattern to make sure all BackGroundWorkers have finished
execution before the above method returns.

Thanks


===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to