Ejemplo n.º 1
0
 private void AddOrUpdateCounter(ConcurrentDictionary <Guid, RawDomainStatistics> dictionary, IPageSelector data, PageRequest request)
 {
     if (RawGatheringRequestModule.Contains(data))
     {
         RawDomainStatistics counter = dictionary.GetOrAdd(data.Id, new RawDomainStatistics(data));
         counter.AddItemInCounter(request);
     }
 }
Ejemplo n.º 2
0
 private void Start()
 {
     while (_workThread.ThreadState == ThreadState.Running)
     {
         PageRequest request;
         if (_requestQueue.TryDequeue(out request) && request != null)
         {
             RawGatheringRequestModule.ProcessRequest(_index, request);
         }
         else
         {
             Thread.Sleep(100);
         }
     }
 }