Esempio n. 1
0
 private override void Run()
 {
     while (doing)
     {
         Element element;
         if (QueueCommon.CountQueue() != 0)
         {
             element = QueueCommon.RemoveQueue();
             Request.ProcessRequest(element.request, element.stopSignal);
         }
         else
         {
             Thread.Sleep(5000);
         }
     }
 }
Esempio n. 2
0
 private override void Run()
 {
     while (doing)
     {
         Request request = null;
         Stopper stop    = null;
         if (QueueStop.CountQueue() != 0)
         {
             stop    = QueueStop.RemoveQueue();
             request = Request.GetRequest(stop);
         }
         else
         {
             Thread.Sleep(5000);
         }
         if (request != null && stop != null)
         {
             QueueCommon.AddQueue(new Element(stop, request));
         }
     }
 }