/// <summary> /// Start the spider. /// </summary> /// <param name="baseURI">The base URI to spider</param> /// <param name="threads">The number of threads to use</param> public void Start(Uri baseURI, int threads) { // init the spider m_quit = false; m_base = baseURI; addURI(m_base); m_startTime = System.DateTime.Now.Ticks;; m_done.Reset(); // startup the threads //for(int i=1;i<threads;i++) //{ DocumentWorker worker = new DocumentWorker(this); worker.Number = 1; worker.session_id = m_sessionId; worker.rootPath = rootPath; worker.start(); //} // now wait to be done m_done.WaitBegin(); m_finished = m_done.WaitDone(m_outputPath); }
/// <summary> /// Start the spider. /// </summary> /// <param name="baseURI">The base URI to spider</param> /// <param name="threads">The number of threads to use</param> public void Start(Uri baseURI, int threads) { // init the spider m_quit = false; m_base = baseURI; addURI(m_base); m_startTime = System.DateTime.Now.Ticks;; m_done.Reset(); // startup the threads for (int i = 1; i < threads; i++) { DocumentWorker worker = new DocumentWorker(this); worker.Number = i; worker.start(); } // now wait to be done m_done.WaitBegin(); m_done.WaitDone(); }
/// <summary> /// Start the spider. /// </summary> /// <param name="baseURI">The base URI to spider</param> /// <param name="threads">The number of threads to use</param> public void Start(Uri baseURI,int threads) { // init the spider m_quit = false; m_base = baseURI; addURI(m_base); m_startTime = System.DateTime.Now.Ticks;; m_done.Reset(); // startup the threads //for(int i=1;i<threads;i++) //{ DocumentWorker worker = new DocumentWorker(this); worker.Number = 1; worker.session_id=m_sessionId; worker.start(); //} // now wait to be done m_done.WaitBegin(); m_finished=m_done.WaitDone(m_outputPath); }
/// <summary> /// Start the spider. /// </summary> /// <param name="baseURI">The base URI to spider</param> /// <param name="threads">The number of threads to use</param> public void Start(Uri baseURI,int threads) { // init the spider m_quit = false; m_base = baseURI; addURI(m_base); m_startTime = System.DateTime.Now.Ticks;; m_done.Reset(); // startup the threads for(int i=1;i<threads;i++) { DocumentWorker worker = new DocumentWorker(this); worker.Number = i; worker.start(); } // now wait to be done m_done.WaitBegin(); m_done.WaitDone(); }