Solved

A way to alert that crawling has finished?

Posted on 2011-09-29
3
254 Views
Last Modified: 2012-05-12
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
Comment
Question by:dkim18
  • 3
3 Comments
 

Author Comment

by:dkim18
ID: 36814917
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
 

Accepted Solution

by:
dkim18 earned 0 total points
ID: 36815467
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
 

Author Closing Comment

by:dkim18
ID: 36815469
Found my own solution.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now