private void Worker0(object data) { ThreadData tData = (ThreadData)data; try { //for (int i = 0; i < 10000; i++) //{ // int j = (i * 100) / 10; //} tData.MutexWaitOne(); string searchValue = tData.SetSingleValue(); tData.Release(); try { System.Net.WebClient wb = new System.Net.WebClient(); wb.DownloadFile("http://www.google.com/search?q=" + searchValue, searchValue + "_SingleThread.html"); } catch { } } catch (Exception e) { tData.Release(); //System.Windows.Forms.MessageBox.Show(e.Message); } }