1

In a project on asp.net and mysql, we need data from 4 different databases. For that we use the main thread, and get each datatable one by one in sequence and processes it. Now we need to optimize it, and we assume that we can save time by using threads to get datatables.

The main problem, I am assuming, how we let main thread to wait for all threads to complete?
Any Idea?
Thanks.

huMpty duMpty
  • 14,346
  • 14
  • 60
  • 99
Nadeem Jamali
  • 1,353
  • 3
  • 16
  • 27
  • This question might help you : **http://stackoverflow.com/questions/360789/in-c-wait-on-the-mainthread-while-continuing-to-process-ui-updates-net-2-0**. Also, I think [Task Parallel Library](http://msdn.microsoft.com/en-us/library/dd537609.aspx) will be a good option for these kind of operations – huMpty duMpty Oct 30 '12 at 13:13

0 Answers0