ThreadPool and c#

Jan 23 2006 6:11 AM

I have been using the threadpool in c# as below. I am uploading 70 files.Only 8 gets uploaded and if i give the messagebox as below al  files get uploaded. What's the problem?



WaitCallback callBack
= new WaitCallback(UploadFileEx0);

for(int i = 0; i < 70; i++)

{

ThreadPool.QueueUserWorkItem(callBack,GetFileName(this.listView1.Items[i].ToString()));

//MessageBox.Show(GetFileName(this.listView1.Items[i].ToString()));

}