예제 #1
0
 private void ThreadFunc()
 {
     while (true)
     {
         if (Globals.Pause)
         {
             //This is ass backwards and overkill. Too lazy to fix at the moment
             CheckForIllegalCrossThreadCalls = false;
             Application.DoEvents();
             Thread.Sleep(1);
             continue;
         }
         Thread.Sleep(1);
         var uri = ThreadPool.Dequeue();
         ProcessSearch(uri);
     }
     // ReSharper disable FunctionNeverReturns
 }
예제 #2
0
 public ThreadPoolTask Dequeue()
 {
     return(pool.Dequeue());
 }