I just started C# programming study. These days I'm studying performance test for specified calculation in .NET 4.0. The system read and copy a number of data, and is calcultaed by my own function.
I'll try to do that for over 300 data set using multi thread system. All threads are started from receiving data, so I'll proceed this part with EventHandler.
I'm confused with how to construct threads. Surely, I can make those as List and work the function one by one like:
Function la = new Function();
List<Thread> threadSet = new List<Thread>();
for (int i = 0; i < 300; i++)
threadSet.Add(new Thread(new ThreadStart(la.doWork)));
for (int i = 0; i < 300; i++)
threadSet[i].Start();
Or is there any better way of? I saw Thread Pool issue, but I don't know how differ from that.
And I wonder if event includes constructing thread is better of thread includes event handler.
English is not my mother language, so maybe I was so wrong for expression about my question.
Thank you. Please, teach me!