Link to home
Start Free TrialLog in
Avatar of dkim18
dkim18

asked on

A way to alert that crawling has finished?

A way to alert that crawling has finished?
Hi,

I have this website downloader in visual c# which runs and finishes downloading files.
I am trying to find a way to alert that crawling has finished.

This download is multithreading.
Basically it parses URI given and find files insert those URIs in a queue.
Each thread takes one URI from the queue and start downloading it.

So I tried to count activeURICount which is a URI trying to download.
If there are no activeURI and queue is empty, I know that crawling is done.

But I am getting StackOverFlowException.

Is there another way you can think of to alert the crawling has finished?
Avatar of dkim18
dkim18

ASKER

WebsiteCrawler.exe!Crawler.WebsiteCrawler.DequeueUri() Line 1076      C#
       WebsiteCrawler.exe!Crawler.WebsiteCrawler.ThreadRunFunction() Line 1001 + 0xc bytes      C#
       mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0x9b bytes      
       mscorlib.dll!System.Threading.ThreadHelper.ThreadStart() + 0x4d bytes      
ASKER CERTIFIED SOLUTION
Avatar of dkim18
dkim18

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dkim18

ASKER

Found my own solution.