示例#1
0
 public WorkSource()
 {
     availableWork       = new ConcurrentQueue <IWork>();
     freeCrawlers        = new ConcurrentQueue <ManualResetEvent>();
     workSourceScheduler = new WorkSourceScheduler();
     workSourceScheduler.OnWorkReadyForProcess(x =>
     {
         availableWork.Enqueue(x);
         NotifyFreeCrawler();
     });
     workSourceScheduler.StartManage();
 }
 public WorkSource()
 {
     availableWork = new ConcurrentQueue<IWork>();
     freeCrawlers = new ConcurrentQueue<ManualResetEvent>();
     workSourceScheduler = new WorkSourceScheduler();
     workSourceScheduler.OnWorkReadyForProcess(x =>
     {
         availableWork.Enqueue(x);
         NotifyFreeCrawler();
     });
     workSourceScheduler.StartManage();
 }