Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 283
  • Last Modified:

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?
0
dkim18
Asked:
dkim18
  • 3
1 Solution
 
dkim18Author Commented:
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      
0
 
dkim18Author Commented:
Found my own solution.
The problem was from my property.

private int nMyCount
private int MyCount
get{nMyCount}
Set{MyCount=value}

Then I did MyCount++.
0
 
dkim18Author Commented:
Found my own solution.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now