コード例 #1
0
 /// <summary>
 /// Tells to the crawler's thread to finish it's last work and exit.
 /// </summary>
 public void Stop()
 {
     try
     {
         log.DebugFormat("Stopping crawler '{0}'...", name);
         thread     = null;
         shouldStop = true;
         if (work != null)
         {
             work.Stop();
         }
     }
     catch (Exception ex)
     {
         log.FatalFormat("Exception occured while executing a work. You should take care for all exceptions while you implement 'ICrawlerJob.Stop()' method.", ex);
         throw;
     }
 }