Exemplo n.º 1
0
 public WorkSource()
 {
     availableWork       = new ConcurrentQueue <IWork>();
     freeCrawlers        = new ConcurrentQueue <ManualResetEvent>();
     workSourceScheduler = new WorkSourceScheduler();
     workSourceScheduler.OnWorkReadyForProcess(x =>
     {
         availableWork.Enqueue(x);
         NotifyFreeCrawler();
     });
     workSourceScheduler.StartManage();
 }
Exemplo n.º 2
0
 public WorkSource()
 {
     availableWork = new ConcurrentQueue<IWork>();
     freeCrawlers = new ConcurrentQueue<ManualResetEvent>();
     workSourceScheduler = new WorkSourceScheduler();
     workSourceScheduler.OnWorkReadyForProcess(x =>
     {
         availableWork.Enqueue(x);
         NotifyFreeCrawler();
     });
     workSourceScheduler.StartManage();
 }