private void ThreadProc()
 {
     while (true)
     {
         DownloadTask task = null;
         if (m_taskQueue.TryDequeue(out task))
         {
             task.BeginDownload();
         }
         else
         {
             break;
         }
     }
 }
Example #2
0
 void DownloadThreadProc()
 {
     while (true)
     {
         DownloadTask task = null;
         if (_taskQueue.TryDequeue(out task))
         {
             task.BeginDownload();
         }
         else
         {
             break;
         }
     }
     lock (_obj)
     {
         _overThreadNum++;
     }
 }